Java Assignment-2
What is object-oriented paradigm?
What is an object?
What is the difference between an object-oriented programming language and object-based
programming language?
What Is The Variable?
How To Declare A Variable In Java?
How To Assign A Value To Variable?
What Is Variable Initialization?
What is the difference between primitive variables and reference variables?
What are the advantages and disadvantages of static variables and static methods ?
What is the output of the following Java program?
1. public class Test
2. {
3. Test(int a, int b)
4. {
5. [Link]("a = "+a+" b = "+b);
6. }
7. Test(int a, float b)
8. {
9. [Link]("a = "+a+" b = "+b);
10. }
11. public static void main (String args[])
12. {
13. byte a = 10;
14. byte b = 15;
15. Test test = new Test(a,b);
16. }
17. }
What is the output of the following Java program?
1. class Test
2. {
3. int i;
4. }
5. public class Main
6. {
7. public static void main (String args[])
8. {
9. Test test = new Test();
10. [Link](test.i);
11. }
12. }