Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialsubhash gc
1,851 PointsWhat is the difference between java.io.console and scanner. Looks like io console don't work in Eclipse.
I am trying to understand the console concept here. I understand it is a class and need to import the io console. What is the difference between console and scanner. Secondly, why we cannot use it in IDE like Eclipse.
1 Answer
asa akira
401 Pointsno it doesnt
Adam Fields
Courses Plus Student 1,652 PointsAdam Fields
Courses Plus Student 1,652 PointsIf I am not mistaken, IDE Eclipse using something called javaw which console commands will not work with. Instead, you must use the Scanner class if you are using Eclipse. I have worked out the TreeStory example (Java Basics) from this course in Eclipse if you still need any help. I tried to snapshot my workspace but ran into problems so here is the raw code(sorry if the formatting is bad):
import java.util.Scanner;
public class EclipseTreeStory {
}