Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Why Eclipse is not printing loops?
icon5.gif  Why Eclipse is not printing loops? [message #1704937] Mon, 10 August 2015 23:58 Go to next message
lionel leon is currently offline lionel leonFriend
Messages: 1
Registered: August 2015
Junior Member
Hey, guys, I'm new so I don't really know if it is the right place to ask that.

I'm learning java with John Purcell's course and I'm stuck in the loops.

package tutorial;

public class loops {
	public static void main(String[] args) {
		int text = 0;
		
		while(text < 10);
		{
			System.out.println("hello");
		}
	}
}


So, following his steps, I've written this in eclipse and tried to run. Running it enables the little red square to stop, the program is not frozen, but nothing is being printed in the console. What am I doing wrong?
Re: Why Eclipse is not printing loops? [message #1705080 is a reply to message #1704937] Tue, 11 August 2015 22:13 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3071
Registered: July 2009
Senior Member
Moving this to the Newcomers forum.
Re: Why Eclipse is not printing loops? [message #1705087 is a reply to message #1705080] Wed, 12 August 2015 04:17 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3502
Registered: July 2009
Senior Member

What happens when it's not an infinite loop? It could be so busy running that loop that the output may never have a chance to be shown.

Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Wed, 12 August 2015 05:13]

Report message to a moderator

Re: Why Eclipse is not printing loops? [message #1705118 is a reply to message #1704937] Wed, 12 August 2015 08:58 Go to previous message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 495
Registered: August 2014
Senior Member
Careful with the semicolons!

Read the original example once again and check every character.


--

Tauno Voipio
Previous Topic:Need easier way to find open editor from list
Next Topic:Tired to lost Time (Eclipse C++)
Goto Forum:
  


Current Time: Thu Sep 19 08:43:37 GMT 2019

Powered by FUDForum. Page generated in 0.02896 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top