Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
Basic Java Chapter 2

Basic Java Chapter 2

Ratings: (0)|Views: 59|Likes:
Published by zyrus-mojica-6477

More info:

Published by: zyrus-mojica-6477 on Nov 30, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

09/10/2010

pdf

text

original

 
Add Comments to a Java Program
To all programs, comments must always be present, be it short or long. It is veryessential to include comments that are non-executable statements for documentation purposes. It helps large programs to be read easily and todetermine why the function or attributes etc. are needed in the program. It is alsoreliable for future references.
Three comments in Java
// ←end-of-line or single comment
/* */ ← multiple line comment
/** */ ← javadoc comment
 
Save, Compile and Execute a Java Programming
After creating a Java programming, the Java source code has to be saved withan extention .java e.g. HelloWorld.java.It is important that the filename and the classname must be the same.All compilers impose case sensitive in Java.
2 steps to perform before viewing the program output:
The source code written must be compiled into bytecodeThe java interpreter will then translate the bytecode into executablestatements.
How to compile a Java application
To compile HelloWorld.javado: javac HelloWorld.javaTo run the applicationdo: java HelloWorld

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->