Popular Post

Showing posts with label tutorials. Show all posts

How to JAVA using JCREATOR (newb) : 2

By : Unknown
Click here for part 1

Creating a variable

variables are like a container, you can put somethin' in to it.

there are many types of variable like: String, Integer, and etc.

in java you can create a variable by,
[Variable_Type] [Variable_Name] = [Variable_Value];

examples:
String hello = "Hello World!!!";

int x = 1;

note: String's value must be enclosed with double quotation, while numbers or integers don't.

Now lets create a new program, if you don't know how to create one click here.

Now type this and run it.
The output must be:
Hello World!!!
3


HAVE FUN EXPLORING THE WORLD OF JAVA!!!


How to JAVA using JCREATOR (newb) : 1

By : Unknown
What you need:

When you're done installing the JDK and JCreator and done ,
create a new java file:
Click the File menu
New --> File...
or simply hold the Control Key then press N (Ctrl+N)

then a File wizard will appear,
type in the name (note: the name will serves as the class for our java program), and click Finish.

Once you're done creating a new java file,
Lets get started coding for our First Java Program!!

Just type in the codes you needed to start a new java program:


  • public class sampleJava - sampleJava is our class
  • public static void main(String[] args) - the class sampleJava runs only the inputted statements, functions and methods inside the main method.
  • System.out.println("Hello World!!!"); - the System.out.println() outputs the inputted string or integer.
Once you're done typing you can run now the file by:
clicking the Run menu then, Run Project
or simply press the F5 Key on your keyboard
or you can click the Play button encircled on the picture above.

Click here for part 2

HAVE FUN CREATING YOUR FIRST JAVA PROGRAM!!!

- Copyright © YourLounge - Absolute Newbie - Powered by Blogger - Designed by Tongkayla -