Talk:Java Programming/Understanding a Java Program
Page contents not supported in other languages.
Tools
General
Sister projects
In other projects
In later modules, we can do more advanced enhancements of this basic program:
org.wikibooks.java.distance
, instead of the default packagea
,b
fields to java.awt.Point2D--djb18:26, 28 January 2006 (UTC)Reply
Could this example be a bit confusing to newbies to the language? --Mattylaws (talk)12:44, 10 March 2010 (UTC)Reply
How do you use the distance program in eclipse? It isn't obvious how points can be entered the command prompt seems unresponsive.
jc@JCMAIN:~/java$ javac Distance.java Distance.java:1: 'class' or 'interface' expected{^1 error
- Any ideas?161.112.83.10210:40, 7 October 2007 (UTC)Reply
This didn't compile for me until I changed:
...
privatestaticintintValue(Stringdata){returnInteger.parseInt(data);}}
To:
privatestaticintintValue(Stringdata){returnjava.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)Reply