Can a final class be inherited by other class?
Which keyword is used to manually throw an exception?
remove() method and the iterator is used to remove an object from ArrayList
Predict the output of the following Java code.
Predict the output of the following Java code.
Which type parameter is commonly used for a generic method to accept and return any type of object?
For Dog and Animal class, correct way of inheritance in java is
Given a method in a protected class, what access modifier do you use to restrict access to that method to only the other members of the same class?
what should be the output of this code block?
import java.util.*;
public class abekus {
public static void main(String args[]) {
LinkedList < Integer > lang = new LinkedList < Integer > ();
lang.add(8);
lang.add(2);
lang.add(1);
lang.add(6);
Iterator it = lang.iterator();
Collections.reverse(lang);
Collections.sort(lang);
while (it.hasNext())
System.out.print(it.next() + " ");
}
}
What will be the output of the following Java program?
import java.lang.System;
class Output
{
public static void main(String args[])
{
byte a[] = { 65, 66, 67, 68, 69, 70 };
byte b[] = { 71, 72, 73, 74, 75, 76 };
System.arraycopy(a, 0, b, 0, a.length);
System.out.print(new String(+ " " + new String(b));
}
}