The output of the relational operators is
insertElement() method is used to insert value and its key
which one is provided thread safety
When the local variable and instance variable are same then we used this variable
int a =10;
long b=a;
the above code is an example of?
What is the use of the final
keyword in Java?
The main difference between object-oriented languages and object-based languages is that:
class show
{
public static void main(String args[])
{
try
{
int a = 9;
int b = 5;
int c = b / a;
System.out.print("Abekus");
}
catch(Exception e)
{
System.out.print("Slack");
}
finally
{
System.out.print("Java");
}
}
}
Predict the output of the following Java code.
class Abekus {
public static void main(String args[])
{
try {
int i = 5 / 0;
}
catch (Exception e) {
System.out.print("Exception ");
}
catch (ArithmeticException e) {
System.out.print("ArithmeticException ");
}
System.out.println("i am on the last line.");
}
}
// It is a class Abekus.
package com.pk3;
public class Abekus{
public void m1()
{
System.out.println("method of Abekus has been called.");
}
}
// This is def class.
package com.pkg2;
import com.pk3.Abekus;
public class def extends Abekus {
public static void main(String args[]) {
Abekus A = new def();
A.m1();
System.out.println("This is Abekus.com");
}
}
What will be the correct output?