Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

'.class' expected

807607Dec 5 2006 — edited Dec 5 2006
Trying something much more simpler now.
public class Counting
{
	public class Counting
{
   public static void main (String args [])
   {
   new Counting ();
   }
   public Counting ()
   {

	int a=10;
	if (int b=10;
	System.out.println("10 9 8 7 6 5 4 3 2 1");
   }
}
Error messages are:
Counting.java:13: '.class' expected
if (int b=10;
^
Counting.java:16: reached end of file while parsing
}��
^
What do they mean with the arrows? does that mean to move the } over to the left or what?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2007
Added on Dec 5 2006
3 comments
100 views