M
Q. Determine output:
Code:class A{ public static void main(String args[]){ int x; x = 10; if(x == 10){ int y = 20; System.out.print("x and y: "+ x + " " + y); y = x*2; } y = 100; System.out.print("x and y: " + x + " " + y); } }
Dear candidates you will find MCQ questions of JAVA here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
M
class A{ public static void main(String args[]){ int x; x = 10; if(x == 10){ int y = 20; System.out.print("x and y: "+ x + " " + y); y = x*2; } y = 100; System.out.print("x and y: " + x + " " + y); } }
M
M
M
M
M
M
M
M
class A{ public static void main(String args[]){ byte b; int i = 258; double d = 325.59; b = (byte) i; System.out.print(b); i = (int) d; System.out.print(i); b = (byte) d; System.out.print(b); } }
K
Use of this keyword example in Java
Program to use Applet with init(), start() and paint() in Java
Program to explain CardLayout in Java
What do you mean by strict mode in javascript and characteristics of javascript strict-mode?
Return the Remainder from Two Numbers in JavaScript
What is a classloader? Java Interview Question
Program to Serialize object of Box class in Java
Don't have account? Register here.