Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Kerri Gonzalez   on Feb 03 In Java Category.

  
Question Answered By: Sonya Flores   on Feb 03

To compile  a java  program, at the command line
type:<br>javac filename.java<br><br>For example, given the file
MyFirstClass.java<br>which contains:<br>class MyFirstClass<br>{<br> public
static void main(String[] args)<br> {<br>
System.out.println("Hello World");<br> }<br>}<br><br>to compile at the
command line type(case sensitive):<br>javac
MyFirstClass.java<br><br>to run at the command line type:<br>java
MyFirstClass<br><br>and you should see the phrase<br>Hello
World<br><br><br>There is lots of good information at
http://java.sun.com especially the
Java Tutorial section.

Share: 

 

This Question has 8 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on how do u compile a prog? Or get search suggestion and latest updates.


Tagged: