Frequently Asked Questions

Q. What is the difference between pseudocode and java . Why do we use pseudocode..

A. You should always design your program before you try to write the code. At the design stage you plan the input and output and the algorithm for your program i.e. the steps to solve the problem. You should express your algorithm in such a way that the steps are clear and the structures used in the program are clear. Pseudocode is a kind of structured english we use at this stage. It should be understandable to somebody who does not know any particular programming language.

At the design stage you do not need to concern yourself with the syntax of a particular programming language.

When you have checked your design and know that it will work you can then think about how to express those steps in the particular programming language you are using - in this course Java- .

At the coding stage you convert your design to java code. If you get your design right the coding stage will be easy!!


Q. I have installed jdk  but  I cannot get my program to compile.

A.  In the dos window set the path to tell the computer where to find the compiler. For example if there is a directory jdk1.3 in c: then the path command would be:-

C:> path c:\jdk1.3\bin

Note the compiler is in a directory bin which is a sub directory of jdk1.3 or jdk1.2 as required. After that you can compile your program as normal e.g.

C:> javac Progname.java