Hi Animesh,
public static void main(
String args[] ) {
int i = 1 ;
do
while( i < 15 )
System.out.println( "Ok" ) ;
while( i < 1 );
}
}
No if the above code is modified in this manner
public static void main( String args[] ) {
int i = 1 ;
do
while( i < 15 ) ;
System.out.println( "Ok" ) ;
//while( i < 1 );
}
}
It's throwing up an error, "while expected",
Does this convey to us that b/w do and while an statement should exist else compiler will throw up an error.