What is the default gap between the components in a FlowLayout?
What is it called where object has its own lifecycle and child object cannot belong to another parent object?
What will be the output of the following Java code?
class Output
{
public static void main(String args[])
{
Double i = new Double(257.578);
int x = i.intValue();
System.out.print(x);
}
}
class test{
public static void main (String[] args) {
for(int i=0;false;i++)
{
System.out.println("Hello");
}
System.out.println("World");
}
}
What is the output of the following code?
public class loop{
public static void main(String[] args){
int i=0;
for(; i<4; i++)
{
System.out.println(i<2);
}
} }
class GFG {
public static void main (String[] args) {
byte x = (byte)64;
int i;
byte y;
i = x>>4;
y = (byte) (x<<3);
System.out.print(i + " " +y);
}
}
What will be the output of the following code?
class A
{
public static void main(String args[])
{
String str = "I" + "like" + "Mango";
System.out.println(str);
}
}
what should be the output of this code block ?
public class abekus {
public static void main(String[] args) {
int a = 0;
a += 5;
switch (a) {
case 5:
System.out.print("5");
break;
case 10:
System.out.print("10");
default:
System.out.print("0");
}
}
}
Predict the output of the following Java code:
class Abekus {
public static void main(String args[])
{
byte[] arr = { 110, 111, 112, 113, 114 };
String str = new String(arr);
System.out.println(str);
}
}