1. WAP to demonstrate the use of Anonymous class.
2. WAP to demonstrate the inheritance of class-class, interface-interface and interface-class.
3. WAP to calculate the sum of all the elements on the major diagonal of a square matrix using the following method:
public static int MajorDiagonal(int [][] arr)
4. WAP in which prompt the user to enter two numbers a and b. If a is divisible by b then throw NumberFormatException. Rethrow the exception from the catch block. And catch the re-thrown exception in a generalized catch block.
5. WAP to create a custom Exception class "TooLongException". Prompt the user to enter a String. If the length of String is greater than 10, then throw TooLongException.
6. WAP in which prompt the user to enter a number. If the number is less than 100 the throw an exception and display "Number is less than 10" and if it is greater than 20 then throw an exception and display "Number is greater than 20". Rethrow the exception in both the cases to print "Thanks".
7. 1. WAP in which Override the balance() of Bank class into Account class and invoke both the methods without using the object of Bank class.
8. WAP to demonstrate the use of this keyword in java.
9. WAP in which use method public int[] double_to_Int(double [] ar) to convert all the double values of argumented array into
int.
10. WAP to create a jagged Array in which rows and columns should be taken as input from user.
11. WAP to remove the last element from the arraylist.
12. WAP to demonstrate Constructor overloading..
13. WAP to delete the given element x from the array using method
public int [] delete(int x, int [] arr ).
14. WAP to calculate the sum of all the elements in a given row using the following method:
public static int RowSum (int row, int [][] arr)
15. WAP to create a class Demo containing a two overloaded methods demo(). Define a local class X containing show()in one of the demo() method. Access the show() from the other demo().
16. Define an interface B containing demo() method and a double variable x initialized with 20.0. Now create a class Test which inherits A and B. Invoke the demo() method and print the value of x. Explain the output.
17. WAP to create an ArrayList. Use a method public void reverseList() to reverse the order of ArrayList elements.
2. WAP to demonstrate the inheritance of class-class, interface-interface and interface-class.
3. WAP to calculate the sum of all the elements on the major diagonal of a square matrix using the following method:
public static int MajorDiagonal(int [][] arr)
4. WAP in which prompt the user to enter two numbers a and b. If a is divisible by b then throw NumberFormatException. Rethrow the exception from the catch block. And catch the re-thrown exception in a generalized catch block.
5. WAP to create a custom Exception class "TooLongException". Prompt the user to enter a String. If the length of String is greater than 10, then throw TooLongException.
6. WAP in which prompt the user to enter a number. If the number is less than 100 the throw an exception and display "Number is less than 10" and if it is greater than 20 then throw an exception and display "Number is greater than 20". Rethrow the exception in both the cases to print "Thanks".
7. 1. WAP in which Override the balance() of Bank class into Account class and invoke both the methods without using the object of Bank class.
8. WAP to demonstrate the use of this keyword in java.
9. WAP in which use method public int[] double_to_Int(double [] ar) to convert all the double values of argumented array into
int.
10. WAP to create a jagged Array in which rows and columns should be taken as input from user.
11. WAP to remove the last element from the arraylist.
12. WAP to demonstrate Constructor overloading..
13. WAP to delete the given element x from the array using method
public int [] delete(int x, int [] arr ).
14. WAP to calculate the sum of all the elements in a given row using the following method:
public static int RowSum (int row, int [][] arr)
15. WAP to create a class Demo containing a two overloaded methods demo(). Define a local class X containing show()in one of the demo() method. Access the show() from the other demo().
16. Define an interface B containing demo() method and a double variable x initialized with 20.0. Now create a class Test which inherits A and B. Invoke the demo() method and print the value of x. Explain the output.
17. WAP to create an ArrayList. Use a method public void reverseList() to reverse the order of ArrayList elements.
Nice...
ReplyDeletewhat will be the program of 6th problem... i need it
ReplyDeleteGood Post! Thank you so much for sharing the nice post, it was so good to read and useful to improve
ReplyDeleteJava Training in Electronic City