Skip to main content

Problem Locating minor Bug

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
gr8tD
Offline
Joined: 2011-08-09

public class ForDemo1
{
public static void main(String[] args)
{
int x = 0, y = 10;
  for(System.out.println("Call Me A Coder or Programmer" ); x < 10; System.out.println("As Long As I Will Become Software Engr. \n AM OK") ;);
{
  System.out.println(x + "," + y);
  x++ ;
  y-- ;
}


 
}


}

Am a newbie so to speak and i have been trying my hand in java to start programming for few months now, so to that effect i have try my wits in little demonstrations in few lines of codes which i have found a considerably interesting so far.
The above is one of few lines of flow control i have tried, but this particular one is given me problem, cos it fails to compile and i have done all i could to locate the bug, unfortunately till now i couldn't,so i decide to bring it here for assistance and more on all what i need do to fast track my learning and make my programming more fun.
Thanks for helping me out.
gr8tD.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
MackSix
Offline
Joined: 2013-03-27

You have an infection of semicolons is why it won't compile. :)