What is the output of the following code?
When implementing an interface method in Java, the method must be declared as:
Which of these methods of the String class is used to extract multiple characters at a time from a String object?
From where does the break
statement cause an exit?
public class Demo123{
public static void main(String args[]){
int i;
for( i=1;i<6;i++){
if(i<4)
continue;
}
System.out.println(i);
}
}
class test {
public static void main (String[] args) {
int[][] arr=new int[][]{{0,1,2,3,4,5,6,7,8,9},{10,11,12,13,14,15,16}};
int n=2;
System.out.println((double)(arr[--n][n*5])/10*2+3/10);
}
}
What will be the output of the following code?
class main
{
public static void main(String args[])
{
Object obj = new Object();
System.out.print(obj.getclass());
}
}
public class outputs
{
public static void main(String args[])
{
double a = 6.4;
int b = 15;
a = a % 25;
b = b % 32;
System.out.println(a%45+b%5 +10);
}
}
class GFG {
public static void main (String[] args) {
int[] A=new int[2];
int[] B=new int[5];
A=B;
System.out.println(A[4]);
System.out.print(B[0]);
}
}