public class TestContinue {
public static void main(
String args[]) {
for ( int i = 0 ; i <2; i++) {
for ( int x=0; x<3; x++) {
if ( i == x) {
continue;
}
System.out.println("i = " + i , " x = " + x);
}
}
}
}
this is giving compilor error,
----------
And this compiling but no output.
public class RightJustify {
private static final String padding =
" "+
" "; // 80 spaces
public static void print(String s, int w) {
Stystem.out.print(padding.substring(0, w - s.length()));
System.out.print(s);
}
public static void print(int i, int w){
print( "" + i, w);
}
public static void main(String arg[]);{
}
}
why this statement has(,) in print statement. And why println
statement negotiating (,),is there special rules I have to know
explain me .
Thanks for previous expln,..