91. What will be the output of the following Java program?
import java.util.*;
class LOCALE_CLASS
{
public static void main(String args[])
{
Locale obj = new Locale("HINDI") ;
System.out.print(obj.getDisplayLanguage());
}
}
import java.util.*;
class LOCALE_CLASS
{
public static void main(String args[])
{
Locale obj = new Locale("HINDI") ;
System.out.print(obj.getDisplayLanguage());
}
}
92. What will be the output of the following Java program?
class Output
{
public static void main(String args[])
{
char a = '@';
boolean x = Character.isLetter(a);
System.out.print(x);
}
}
class Output
{
public static void main(String args[])
{
char a = '@';
boolean x = Character.isLetter(a);
System.out.print(x);
}
}
93. What will be the output of the following Java code?
class Output
{
public static void main(String args[])
{
double x = 3.14;
int y = (int) Math.floor(x);
System.out.print(y);
}
}
class Output
{
public static void main(String args[])
{
double x = 3.14;
int y = (int) Math.floor(x);
System.out.print(y);
}
}
94. What will be the output of the following Java program?
import java.util.*;
class LOCALE_CLASS
{
public static void main(String args[])
{
Locale obj = new Locale("HINDI", "INDIA") ;
System.out.print(obj.getDisplayLanguage());
}
}
import java.util.*;
class LOCALE_CLASS
{
public static void main(String args[])
{
Locale obj = new Locale("HINDI", "INDIA") ;
System.out.print(obj.getDisplayLanguage());
}
}
95. What will be the output of the following Java code?
class Output
{
public static void main(String args[])
{
long start, end;
start = System.currentTimeMillis();
for (int i = 0; i < 10000000; i++);
end = System.currentTimeMillis();
System.out.print(end - start);
}
}
class Output
{
public static void main(String args[])
{
long start, end;
start = System.currentTimeMillis();
for (int i = 0; i < 10000000; i++);
end = System.currentTimeMillis();
System.out.print(end - start);
}
}
96. All methods must be implemented of an interface.
97. What will be the output of the following Java code?
class Output
{
public static void main(String args[])
{
Double i = new Double(257.5);
Double x = i.MAX_VALUE;
System.out.print(x);
}
}
class Output
{
public static void main(String args[])
{
Double i = new Double(257.5);
Double x = i.MAX_VALUE;
System.out.print(x);
}
}
98. Which of these exceptions is thrown by methods of System class?
99. Which of these class encapsulate the runtime state of an object or an interface?
100. Which of these methods is used to notify observer the change in observed object?
Read More Section(Interfaces and Abstract Classes)
Each Section contains maximum 100 MCQs question on Interfaces and Abstract Classes. To get more questions visit other sections.