I had tried setting up Tomcat with my Apache2/PHP5 setup which all worked but I couldn't actually create any webapps of my own -- not even Hello World so I gave up and figured maybe I should play around in an IDE first. Might as well jump on this Java bandwagon since all the kool kids are doing it
Java IDE
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Java IDE
If I'm learning java purely out of interest is something like BlueJ (under Linux not that it matters) going to help or have an adverse effect? Is BlueJ actually the best IDE to learn with?
I had tried setting up Tomcat with my Apache2/PHP5 setup which all worked but I couldn't actually create any webapps of my own -- not even Hello World so I gave up and figured maybe I should play around in an IDE first. Might as well jump on this Java bandwagon since all the kool kids are doing it
I had tried setting up Tomcat with my Apache2/PHP5 setup which all worked but I couldn't actually create any webapps of my own -- not even Hello World so I gave up and figured maybe I should play around in an IDE first. Might as well jump on this Java bandwagon since all the kool kids are doing it
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
arrays don't resize automatically as with php.. And you have to initialize them first...
But since your using the array as a colelction that can grow... I'd use a Vector:
Or if you're writing java5 use a type-safe collection:
And in both situations:
Code: Select all
public Zoo(String name) {
this.name = name;
// reserve space for 10 animals
this.animals = new Animal[10];
}
Code: Select all
private Vector animals;
public Zoo(String name) {
this.name = name;
this.animals = new Vector();
}
Code: Select all
private List<Animal> animals;
public Zoo(String name) {
this.name = name;
this.animals = new List<Animal>();
}
Code: Select all
public void Add(Animal animal) {
this.animals.add(animal);
}
netBeans isn't bad, either. Though I prefer Eclipse as I use it for php too. (eclipse utterly rocks now I'm using Linux.. it was slow on Windows for me.)
Real time updating for code hints, realtime use of Javadoc/phpDoc' comments.. it's just so beautiful it brings a tear to my eye*..
*may not be true
Real time updating for code hints, realtime use of Javadoc/phpDoc' comments.. it's just so beautiful it brings a tear to my eye*..
*may not be true
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Re: Java IDE
I just started with Java for university and we're made to use BlueJ. Seems OK to me but I haven't tried anything else.d11wtq wrote:If I'm learning java purely out of interest is something like BlueJ (under Linux not that it matters) going to help or have an adverse effect? Is BlueJ actually the best IDE to learn with?
I had tried setting up Tomcat with my Apache2/PHP5 setup which all worked but I couldn't actually create any webapps of my own -- not even Hello World so I gave up and figured maybe I should play around in an IDE first. Might as well jump on this Java bandwagon since all the kool kids are doing it
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Thanks ~timvw. Makes perfect sense. I started using ArrayList before I read your reply and it seems to work a peach 
I'm basically writing a comical app as practise for some design patterns in Java.
It's a Zoo and it contains animals. The animals require the correct temperature range to live and they also eat other animals or plants. They need food to live. The idea is that the user can add animals to the Zoo, change the temperature ect and things will start to either die or eat each other based upon what order things happen in. It's quite fun
I'm basically writing a comical app as practise for some design patterns in Java.
It's a Zoo and it contains animals. The animals require the correct temperature range to live and they also eat other animals or plants. They need food to live. The idea is that the user can add animals to the Zoo, change the temperature ect and things will start to either die or eat each other based upon what order things happen in. It's quite fun
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia