Firstly,you must have a jdk software installed on your computer.
Then, move to the precribed directory and type the program.
The basic structure of the program constitutes:
//comment:this program does basic calculation on numbers.
import java.io.*;
class
{public static void main(String args[])throws IOException
DataInputStream z = new DataInputStream(System.in);
int a,b;
a = Integer.parseInt(z.readLine());
b = Integer.parseInt(z.readLine());
System.out.println("Sum:" + a + b);
System.out.println("Product:" + a * b);
}
}
Save the program in a file :.java
Compile the program by typing:javac .java
If everything is OK then a class file with codes will be created.
To run the program type: java ;in DOS mode.
Note:Do not type .class or .java
2007-03-03 15:44:03
·
answer #1
·
answered by Anonymous
·
0⤊
0⤋
get a book and starting playing around. Or you can look on the web for java tutorial and then play around.
2007-03-03 00:12:24
·
answer #2
·
answered by John 5
·
0⤊
0⤋
hey thats simple.........get a java basic program book...........start studying ...install java on ur computer.......then try some programs....i am sure that will help u 2 get throoooooo
2007-03-03 02:58:50
·
answer #3
·
answered by sathiyendran a 3
·
0⤊
0⤋
you need to doubtlessly create an array listed via "char" and then run via the enter doing something like: countArrray[inputCharacter]++; Then on the top, sum up the counts for: countArray['a'] countArray['e'] countArray['i'] etc.
2016-11-27 01:42:26
·
answer #4
·
answered by krolick 4
·
0⤊
0⤋
take a course or a good book
you must know what is the class, attribute... etc
2007-03-03 00:19:08
·
answer #5
·
answered by uu 2
·
0⤊
0⤋