Write a Java program to assign a string and print it in the following way( I WARN YOU THAT SPAMS WILL BE REPORTED)
COMPUTER
COMPUTE
COMPUT
COMPU
COMP
COM
CO
C
Please answer it....
Answers
Answered by
0
class xyz
{
void main()
{
Sting a=COMPUTER;
String b=COMPUTE;
String c=COMPUT;
String d=COMPU;
String e=COMP;
String f=COM;
String g=CO;
String h=C;
System.out.println(a);
System.out.println(b);
System.out.println(c);
System.out.println(d);
System.out.println(e);
System.out.println(f);
System.out.println(g);
System.out.println(h);
}
}
{
void main()
{
Sting a=COMPUTER;
String b=COMPUTE;
String c=COMPUT;
String d=COMPU;
String e=COMP;
String f=COM;
String g=CO;
String h=C;
System.out.println(a);
System.out.println(b);
System.out.println(c);
System.out.println(d);
System.out.println(e);
System.out.println(f);
System.out.println(g);
System.out.println(h);
}
}
AneekBiswas1:
Lame answer
Similar questions