Home / Programming MCQs / JAVA MCQs / Question
J
Q. The following program is an example for?
class Student{ int id; String name; void display(){System.out.println(id+" "+name);} public static void main(String args[]){ Student s1=new Student(); Student s2=new Student(); s1.display(); s2.display(); } }
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
Which of the following is a valid Java identifier?
Which fields enjoy highest degree of protection in Java
A method without the body is called ________ method.
Output of following Java program
What is the output of the following code snippet?
What is the output of the below Java program with WHILE, BREAK and CONTINUE?
What is the output of the Java program?
What is the output of Java program with Right Shift Operator (>>)?
What is the output of the below Java code with Enums and Constructors?
How do you change the current layout manager for a container?
Discusssion
Login to discuss.