\W matches nonword character using regular expression in java
Runnable r = new Runnable() {
@Override
public void run() {
}
};
Is the code valid?
Which of these class holds a collection of static methods and variables?
class test{
public static void main (String[] args) {
int x=10;
if(++x<10 || x/0>10)
System.out.println("Hello");
else
System.out.println("Hi");
}
}
public class outputs
{
public static void main(String args[])
{
int a=10;
int b=20;
int c=15;
int sum=0;
sum= a%b%c;
System.out.println(sum);
}
}
What is the output of the following Java code?
class Abekus {
public static void main(String args[]) {
System.out.println(fun());
}
static int fun(int x = 0) {
return x;
}
public class Demo123{
public static void main(String args[]){
int a=10,b=12;
if(a && b){
System.out.println("Abekus");
}
else
System.out.println("not Abekus");
}
}
public class Demo123{
public static void main(String args[]){
int a=10;
Integer b=12;
if(a.equals(b)){
System.out.println("true");
}
else
System.out.println("false");
}
}
Which one of the following is not true?
Predict the output of the following Java code:
class Abekus {
public static void main(String[] args) {
int i1[] = { 10, 20, 30, 40, 50 };
int i2[] = { 10, 20, 30, 40, 50 };
for (int i = 0; i < 4; i++)
System.out.print(i1[i] + " ");
System.out.println();
for (int i = 0; i < 4; i++)
System.out.print(i2[i+1] + " ");
}
}