JA
JAV
JAVA
JAVAJ
JAVAJ2
JAVAJ2E
JAVAJ2EE
Solution:
class PrintJava
{
public static void main(String[] args)
{
char[] arrChar={'J','A','V','A','J','2','E','E'};
for(int i=0;i<=8;i++)
{
for(int j=0;j<i;j++)
{
System.out.print(arrChar[j]);
}
System.out.println();
}
}
}
Thanks
ReplyDelete