Talk:Java Programming/Understanding a Java Program
From Wikibooks, the open-content textbooks collection
In later modules, we can do more advanced enhancements of this basic program:
- put this in a package,
org.wikibooks.java.distance
, instead of the default package
Could this example be a bit confusing to newbies to the language? --Mattylaws (talk) 12:44, 10 March 2010 (UTC)
[edit] Questions
How do you use the distance program in eclipse? It isn't obvious how points can be entered the command prompt seems unresponsive.
[edit] error
jc@JCMAIN:~/java$ javac Distance.java Distance.java:1: 'class' or 'interface' expected { ^ 1 error
- Any ideas? 161.112.83.102 10:40, 7 October 2007 (UTC)
This didn't compile for me until I changed:
...
private static int intValue(String data) { return Integer.parseInt(data); } }
To:
private static int intValue(String data) { return java.lang.Integer.parseInt(data); } }
That said I really don't know what I'm doing here, and just got the idea to try that off of some random googling. Should the page be changed, or maybe there's a better fix. --Keithonearth (talk) 19:09, 21 August 2009 (UTC)