You guys don't get it.I'm new even a simple codes that I make don't work.
Simple example.
import java.util.Scanner;
public class project
{
public static void main(String args[ ])
{
Scanner sc=new Scanner();
double NUM=0;
System.out.println("Enter A Number");
NUM=sc.nextDouble();
}
}
Thanks for the help,
Starz
P.S. What program do you use to code?
> You guys don't get it.I'm new even a simple codes
> that I make don't work.
>
> Simple example.
> import java.util.Scanner;
>
> public class project
> {
> public static void main(String args[ ])
> {
> Scanner sc=new Scanner();
> double NUM=0;
> System.out.println("Enter A Number");
> NUM=sc.nextDouble();
> }
> }
>
> Thanks for the help,
> Starz
>
> P.S. What program do you use to code?
Have you ever done it in command line ?
What error are you getting that makes you think the import isn't working correctly ?
> Text Pad?
> How? How would I compile it and test it?
with a java compiler a JVM and Junit, perhaps? or is that not the sort of testing you meant? this is why beginners need to avoid IDEs, they just don't know how to live without their nice safe crutch. TextPad is actually pretty java-friendly, if you've got the jdk installed, it will almost certainly pick it up, and allow you to compile and run java from within it, or you could - and I know this is a stretch - use *gasp* command-line tools!
nobody needs an IDE, they just make life more easy for those who know what they need from one
> Text Pad?
> How? How would I compile it and test it?
<voice type="drill sergeant">
LIKE A REAL MAN! ON THE COMMAND LINE!
</voice>
Actually TextPad come with hooks for that. They appear on the Tool menu, and have short cuts Ctrl+1 (compile) and Ctrl+2 (execute). If you do not see them on the Tools menu, take a look at: Configure | Preferences ... | Tools. I forget, but you may need to click on something on that dialog to add the Java commands to the Tools menu.
> Text Pad?
> How? How would I compile it and test it?
I think the best way to start Java is have a look on tutorial first.
TextPad is an editor which you can write your Java code.
You need a JDK which compile and run your Java program.
If you read the tutorial, all instructions can be found.
> nobody needs an IDE, they just make life more
> easy for those who know what they need from one
or rather, if you can't work without one you should be in another line of work. Something like delivering mail (but how you'd get around without a GPS if you can't find your way around a computer without an IDE I don't know) or flipping burgers.
Some time I feel Sun would have bundled an IDE along with java since its inception just as microsoft MSDN Studio. Now for Java different people use different IDE's and its more confusing for a novice what to pick.
Personally I feel that new developers should work command line and use a vi/vim like editors(?). I have seen people use IDE like NB or Eclipse from their inception and finally end up not knowing any thing of java command line tools like javap, jdb or any VM_OPTIONS.