Q-10 find the output of the following program code.
class demo
{
public static void main(String[] args)
{
System.out.println(null);
}
}
1) NULL 2) C.T.E 3) NULL POINTER EXCEPTION 4) RUN TIME ERROR
Q-1:Write a java program to create the star tringle.
class Triangle { public static void main(String[] args) { int i,j,k; for(i=1; i<=5; i++) { for(j=4; j>=i; j--) { System.out.print(" "); } for(k=1; k<=(2*i-1); k++) { System.out.print("*"); } System.out.println(""); } } }