Which of these interfaces is not part of Java's collection framework?
What is the output of the following Java program?
get() methods are used to retrieve the elements in properties object at a specific location
An array elements are always stored in
What are the benefits of using inheritance in Java?
Which class in the java.lang package does not override the equals() and hashCode() methods, inheriting them directly from class Object?
Which statement is true about Java?
class test{
public static void main (String[] args) {
String str="My name is Joker";
if(str.charAt(9)==(int)str.charAt(9))
{
System.out.println(Integer.toBinaryString(32/2/2));
}
else
{
System.out.println(Double.parseDouble("100"));
}
}
}
Which of the following code snippets is equivalent to the given Java code?
public class ex {
public static void main(String[] args) {
int x=10,y=20;
if(x>5){
if (y>10)
System.out.println("Hello");
}
else
System.out.println("World");
}
}
class Father{
void run(){
System.out.println("father start running");
}
void walk(){
System.out.println("father start walking");
}
}
class Child extends Father{
@Override
void run(){
System.out.println("children start running");
}
@Override
void walk(){
System.out.println("children start walking");
}
void sleep(){
System.out.println("children start sleep");
}
}
public class main {
public static void main(String args[]){
Father f1=new Father();
Child c1= new Child();
c1.run();
c1.walk();
}
}