eclipse - Out put in console -
package lesson1; public class starprogram { public static void main(string[] args) { // todo auto-generated method stub for(int i=1;i<=3;i++){ for(int j=1;j<=3;j++) { system.out.println("*"); }system.out.println(); } } } for program, getting out put
* * * * * * * * * but should right?:
* * * * * * * * * what problem in program?
this may you. read difference between system.out.print , system.out.println
change
for(int j=1;j<=3;j++) { system.out.print("*"); }system.out.println(); instead of
for(int j=1;j<=3;j++) { system.out.println("*"); }system.out.println();
Comments
Post a Comment