21. What is the order of variables in Enum?
22. How to get UTC time?
23. Which class is a library of functions to perform arithmetic operations of BigInteger and BigDecimal?
24. What will be the output of the following Java code snippet?
class A
{
}
enum Enums extends A
{
ABC, BCD, CDE, DEF;
}
class A
{
}
enum Enums extends A
{
ABC, BCD, CDE, DEF;
}
25. What will be the output of the following Java program?
class mainclass {
public static void main(String args[])
{
boolean var1 = true;
boolean var2 = false;
if (var1)
System.out.println(var1);
else
System.out.println(var2);
}
}
class mainclass {
public static void main(String args[])
{
boolean var1 = true;
boolean var2 = false;
if (var1)
System.out.println(var1);
else
System.out.println(var2);
}
}
26. What is the limitation of toString() method of BigDecimal?
27. What will be the output of the following Java code snippet?
enum Enums
{
A, B, C;
private Enums()
{
System.out.println(10);
}
}
public class MainClass
{
public static void main(String[] args)
{
Enum en = Enums.B;
}
}
enum Enums
{
A, B, C;
private Enums()
{
System.out.println(10);
}
}
public class MainClass
{
public static void main(String[] args)
{
Enum en = Enums.B;
}
}
Read More Section(Data Types and Variables)
Each Section contains maximum 100 MCQs question on Data Types and Variables. To get more questions visit other sections.