Week #8: Java
CHALLENGE:
Experience the Java programming language. For those of you C++ or .Net programmers out there, here's your chance to see what all Java fanatics love about Java
INTRODUCE THE LANGUAGE/TECHNOLOGY:
Java was a revolutionary language when it was first created that was modelled from C++. The idea was that you could run a Java program on any computer system that supported the Java Virtual Machine (JVM). The first implementation wasn't very well received and there were many jokes about the "write it once" philosophy. The second release of Java solved all of the problems and Java has become a powerful, popular, high level programming language. Because of the JVM, Java runs on almost any system. You can not only create desktop programs with Java, you can create web applications as well. Java also has its own GUI toolkit called Swing that is used to create familiar windowed applications like web browsers. integrated development environments, and more. What made Java revolutionary was that it was compiled into bytecode. The JVM would then read the bytecode to have the program execute. Unlike traditional interpretters, the bytecode allowed programs to execute faster.
IDEAS:
- Command-Line Calculator
- GUI Calculator
- Applets!
- Notepad
- Games, using Swing
- HTML WYSIWIG editor Advanced
- Create an appointment book that uses a database Advanced
RESOURCES:
Official Sun website download
Official tutorial
Dream.In.Code tutorials
Dream.In.Code snippets
HOW TO GET STARTED:
This is the best startup guide I think I've ever read:
http://java.sun.com/...rted/index.html
All that you need is a text editor and the Java JDK. You can download the Java JDK from this link. You do not have to use a text editor. You can also use an integrated development environment(IDE) instead. With the IDE you will still need the Java JDK. Popular IDEs for Java are Net Beans, Eclipse, and JCreator.
Java is a completely Object-Oriented language. That means that everything and everything is a class and composed of objects. Here is the traditional "Hello World" program written in Java. When learning a new language the majority of people will write a program that will print "Hello World" on the screen. You should note that the name of the class your main method is in needs to have the same file name as the name of the class. In the example below, when you save your program, it must be named Hello.java for the program to work.
class Hello {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
WHERE TO GO FOR HELP:
If you are in need of help with you Java programs, you can visit the Java forum here on DIC. The java code snippets and java tutorials will help you in your challenge as well. The best resource for beginning with Java are the Java Tutorials from Sun.

New Topic/Question
Reply




MultiQuote















|