class Hello
{
public static void main(String args[])
{
System.out.println("Hello World");
}
}
2. Program
//Find the O/P ?
class A
{
public static void main(String args[])
{
System.out.print("done");
}
}
3. Program
//Find the O/P ?
class C
{
public static void main(String args[])
{
System.out.println("Hello to all");
System.out.println("Hello to all");
System.out.println("Hello to all");
}
}
4. Program
//Find the O/P ?
class D
{
public static void main(String args[])
{
System.out.println("Hello to all");
System.out.println(1000);
System.out.println('a');
System.out.println(10.99);
System.out.println();
System.out.println(100+100);
System.out.println(100==2000);
System.out.println(10!=40);
}
}
5. Program
//Find the O/P ?
class E
{
public static void main(String args[])
{
int i = 10;
System.out.println(i);
i = 20; //Reinitialization
System.out.println(i);
}
}
6. Program
//Find the O/P ?
class F
{
public static void main(String args[])
{
int i;
i = 10;
System.out.println(i);
}
}
7. Program
//Find the O/P ?
class G
{
public static void main(String args[])
{
int i = 20;
int j = i;
System.out.println(i);
System.out.println(j);
}
}