Join Now
Home Aptitude Reasoning DI VA GK CA CA Hindi Quiz Placements
Object obj = new Object();
Object obj = Object();
Object obj = new Object;
Object obj = Object;
double var = 3.14159;
double var = 3,14159;
double var = "3.14159";
double var = Double.parseDouble("3.14159");
final int var = 5;
int const var = 5;
const int var = 5;
int var = 5; final
What is the output of the following program?
public class Main {public static void main(String[] args) {int x = 5;int y = 2;System.out.println(x % y); }}
1
2
3
5
int
float
string
char
public class Main {public static void main(String[] args) {int x = 5;int y = 2;System.out.println(x + y); }}
7
String var = "hello";
String var = new String("hello");
String var = 'hello';
String var = "hello".toUpperCase();
public class Main {public static void main(String[] args) {int x = 5;int y = 2;int z = x / y;System.out.println(z); }}
2.5
public class Main {public static void main(String[] args) {int x = 5;int y = 2;System.out.println(x > y || y < x); }}
0
Compile error
Runtime error
public class Main {public static void main(String[] args) {int x = 5;int y = 2;System.out.println(x != y); }}