MC Modding
Please register and join the community!

Creating your first java program!

View previous topic View next topic Go down

Creating your first java program!

Post by breakyorself on Tue Oct 25, 2011 5:31 am

First you need the JDK and eclipse:
Search them online it wont let me paste links Neutral

Open it up and start a new java project by clicking file>new java project
Then right click on your project code area and click new class.
name your class apples.
now lets start.
Code:

class apples{

}
 

Now lets start to printing tihngs.
System.out.println("");
that print whatevers in the "" on a new line.
NOTE: end every line of code with a semi colon ;
Now lets start.
Code:

class apples{
public static void main(String[] args){
System.out.println("Hello World!");
}
}
 
Now find the compile and run button and click it.
If you did it correctly a screen should pop up and say
Hello Word!


Last edited by breakyorself on Wed Oct 26, 2011 1:28 am; edited 2 times in total
avatar
breakyorself
Member

Posts : 60
Join date : 2011-10-19

View user profile

Back to top Go down

Re: Creating your first java program!

Post by TheOnly1ne on Tue Oct 25, 2011 3:01 pm

breakyorself wrote:First you need the JDK and eclipse:
Search them online it wont let me paste links Neutral

Open it up and start a new java project by clicking file>new java project
Then right click on your project code area and click new class.
name your class apples.
now lets start.
Code:

class apples{

}
 

Now lets start to printing tihngs.
System.out.println("");
that print whatevers in the "" on a new line.
NOTE: end every line of code with a semi colon ;
Now lets start.
Code:

class apples{
System.out.println("Hello World!");
}
 
Now find the compile and run button and click it.
If you did it correctly a screen should pop up and say
Hello Word!
1 nice thenewboston ripoff 2. you forgot
Code:
public static void main(String args[]) {

}

TheOnly1ne
Member

Posts : 10
Join date : 2011-10-20
Location : I'm in your window.

View user profile

Back to top Go down

Re: Creating your first java program!

Post by breakyorself on Wed Oct 26, 2011 1:30 am

thenewboston?
avatar
breakyorself
Member

Posts : 60
Join date : 2011-10-19

View user profile

Back to top Go down

Re: Creating your first java program!

Post by Jack_The_Miner on Wed Oct 26, 2011 8:58 am

TheOnly1ne wrote:
1 nice thenewboston ripoff 2. you forgot
Code:
public static void main(String args[]) {

}
Not everyone learns from thenewboston, most people take classes or read up on this, it is the most basic of Java.
avatar
Jack_The_Miner
Member

Posts : 1
Join date : 2011-10-19
Location : That place.

View user profile

Back to top Go down

Re: Creating your first java program!

Post by breakyorself on Wed Oct 26, 2011 10:49 pm

Thanks for agreeing with me Jack .
avatar
breakyorself
Member

Posts : 60
Join date : 2011-10-19

View user profile

Back to top Go down

Re: Creating your first java program!

Post by jesshankin22 on Mon Oct 31, 2011 8:01 am

well, it's the general lesson that people get taught. you can look up other people and they'll show you the EXACT same thing

jesshankin22
Member

Posts : 47
Join date : 2011-10-24

View user profile

Back to top Go down

Re: Creating your first java program!

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum