As the university starts, I have a new module called "JAVA"! I already have good basic knowledge with visual c#, php and html. But I have never done anything in java.
Our teacher is a rather old man and as far as I got from first class, it is going to be some old stuff. some of the codes to do in first class were like this:
/*Hello.java, Jan Geerlings, 22 august 2002*/
public class Hello
{
public static void main(String[] args)
{
System.out.println("Hello...My name is \n");
}
}
For compiling this file we had to go to command prompt and run "javac Hello.java" then "java Hello.java"
Another example he gave us was:
import java.applet.Applet;
import java.awt.*;
public class Welcome extends Applet
{
public void paint(Graphics g)
{
g.drawString("Welcome... My name is .. ", 50, 20);
}
}
And this one had to run through an html, obviously with following code:
<applet CODE="Welcome.class" WIDTH="250" HEIGHT="150"></applet>
So my question is we used a pretty old dated text editor called UltraEdit and knowing that I come from Visual Studio 2010 experience, it was quite a bit of hassle: No autocomplete, not nice text formatting like brackets and stuff and worse of all no text coloring at all unless compiled first and tons of other limitation.
He also showed us some final assignment from previous students. It was mainly some basic games like PACMAN! and an animation about southpark etc...
Would you kindly tell me what kind of java I am dealing with, and what is a good IDE that can compete with Visual Studio? I went to Eclipse site and there are quite different IDE versions like JAVA EE and normal JAVA. Which one suits my case?
Thanks!
-
'I have a new module called "JAVA"' Tip. Don't learn Java from people that cannot spell it (or at least write it in the correct case).Andrew Thompson– Andrew Thompson2011年09月05日 10:35:51 +00:00Commented Sep 5, 2011 at 10:35
-
1FYI, once you compile code by javac Hello.java, you run it by typing java Hello instead of java Hello.java :)TeaCupApp– TeaCupApp2011年09月05日 10:36:01 +00:00Commented Sep 5, 2011 at 10:36
-
3"Our teacher is a rather old man" - Don't be like that. You will be an old man one day too ... unless your children kill you off first for being unfashionable :-)Stephen C– Stephen C2011年09月05日 10:36:41 +00:00Commented Sep 5, 2011 at 10:36
-
@Andrew lol good one, I guess Sean87 is typing in uppercase to make it sound loud :) it happens to all when they are noob to Java.TeaCupApp– TeaCupApp2011年09月05日 10:37:51 +00:00Commented Sep 5, 2011 at 10:37
-
@Stephen Sorry I was not going to be mean, just wanted to point to the fact we are going to do something which belongs to 1998-2002 as far as I can see on his code // comments!Dumbo– Dumbo2011年09月05日 10:43:10 +00:00Commented Sep 5, 2011 at 10:43
4 Answers 4
Your Java class teaches basic running Java and a technology that has been taken over by Web 2.0 called Java Applet.
The lesson below that you have below is the most basic form of running Java
/*Hello.java, Jan Geerlings, 22 august 2002*/
public class Hello
{
public static void main(String[] args)
{
System.out.println("Hello...My name is \n");
}
}
It basically run the program off the console. As you learn later, a lot of frameworks provide other entry point other than static void main(String[] args) especially in the context of Server programming and even Android. It's always good to know where everything starts though
The lesson below is an applet:
import java.applet.Applet;
import java.awt.*;
public class Welcome extends Applet
{
public void paint(Graphics g)
{
g.drawString("Welcome... My name is .. ", 50, 20);
}
}
It was meant to be one of the technologies that introduced interactivity to the browsers, however Javascript got matured and Web 2.0 came and took over as the mainstream technology.
For Eclipse you need the basic one for now. Get the latest version from Eclipse site, it should be enough for you. Eclipse provide dynamic software update to get additional modules if you need to.
I suggest you take a look of the syllabus and glance over what being taught given you have experience on other languages. Once you have grasped the basics, you should look for similar technology/pattern to what you have learned in other languages, such as but not limited to:
- Language features such as OO Constructs, Generics, Threading model
- Event driven programming and UI
- Common server side programming that you could compare with other technologies from other language
- Accessing data storage such as relational database
- Java based Mobile technology such as Android
Comments
Eclipse 3.7 is most likely the version you want since you're still doing quite basic stuff. There is no harm whatsoever in starting with the command line though. It will give you a better appreciation of how things fit together.
Comments
Would you kindly tell me what kind of java I am dealing with
Java is Java just as C# is C#. Its just what you do with it that changes.
what is a good IDE that can compete with Visual Studio
Have a look at Eclipse. IMO its the best java IDE. Its not quite a polished as VS but it does some thing better.