Java

From Js

Jump to: navigation, search

Programming II - Advanced programming in Java Home.
Java 388 Course Syllabus

Hello World

Here is the HelloWorld.java file:

public class HelloWorld {

 public static void main(String[] args)
 {
    String hello; // declare a string variable.
    hello = "Hello World"; // assign hello a value.
    System.out.println(hello); // this is like the cout function in c++.
 }  // end of main function.

} // end HelloWorld class.

Syntax Errors

Let's make some syntax errors on purpose and observe the compiler errors so that we may be better equipped to fix them.

1. Omitted semiclolon.
      Gives line number and reports missing semicolon. ";"
      Use ":set nu" in vim to show line numbers.
2. Omitted ending quote.
      Gives line number and reports "unclosed string literal"
3. Mispelled method name.
      A method is a function most Java programmers call them methods.

IDE

IDE is of course an Integrated Development Environment; which is collection of a text editor, compiler, and debugger and sometimes other stuff.

Usually I just use vim, javac and java for my projects, but here are some others:

JS Wiki
Mr. O's Box
professional development