0% found this document useful (0 votes)
10 views2 pages

Java Object-Oriented Programming Guide

The document covers fundamental concepts of object-oriented programming, including definitions of objects, variables, and distinctions between programming languages. It also includes Java code examples and questions regarding variable declaration, initialization, and the output of specific Java programs. Additionally, it discusses the advantages and disadvantages of static variables and methods.

Uploaded by

praveenmasthan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Java Object-Oriented Programming Guide

The document covers fundamental concepts of object-oriented programming, including definitions of objects, variables, and distinctions between programming languages. It also includes Java code examples and questions regarding variable declaration, initialization, and the output of specific Java programs. Additionally, it discusses the advantages and disadvantages of static variables and methods.

Uploaded by

praveenmasthan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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. }

You might also like