Shadow Blade
Morrowland Presents Apron Tutorials
game - design - multimedia - web - programming - tutorials - There are currently viewers visiting Apron Tutorials.
   
 
TECHNICAL
GRAPHICAL
SOUND
GAME
WEB
ARTICLE
TOOL
PROJECT
 
 NEWS

  news

  history


 TECHNICAL TUTORIALS

  opengl

  direct3d

  c/c++

  visual basic

  java

  c#


 WEB TUTORIALS

  html

  dhtml

  asp

  php


 IMAGE EDITING

  photoshop

  draw sketch


 3D MODELING

  3d studio


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 DEMOS

  win32 api


 ARTICLES

  general

  opengl


 COMMUNITY

  about us

  credit

  contact












// Define our new java class
// Since we call it Class1 we must name our java file Class1.java
public class Class1
{
	 // The main function (called when you execute your program)
	public static void main(String[] args)
	{

		// declare a new variable myNumber as integer
		// it can now hold numbers (..,-2,-1,0,1,2,3,...n).
		// the default value = 0.
		int myNumber;
		// declare a new variable myDecimalNumber as double
		// it can now hold decimalnumbers ( -2.7 or 1.5)
		double myDecimalNumber;
		// declare a new variable myChar as char. It can hold a character.
		char myChar;
		// declare a new variable myBool as boolean
		// it can hold true or false (1 or 0). The default value = false.
		boolean	myBool;

		// define the variable myNumber and set value equal to 5
		myNumber = 5;
		 // define the variable myDecimalNumber and set value equal to 8.8;
		myDecimalNumber = 8.8;
		 // define the variable myChar as the character a.
		myChar = 'a';
		 // define the variable myBool as true.
		myBool = true;

		// Display myNumber
		System.out.println("my number: " + myNumber);
		// Display myDecimalNumber
		System.out.println("my decimal number: " + myDecimalNumber);
		// Display myChar
		System.out.println("my character: " + myChar);
		// Display myBool
		System.out.println("my boolean: " + myBool);

	}
}

// Learn to declare and define different variables and to display them.



Download The Source Code! Download Java Source Code


I hope you found this java tutorial useful!

Don't forget to mention Apron Tutorials in your References!

Best Regards
Ronny André Reierstad

 LINKS

  morrowland home



 GAME DEVELOPEMENT

  nvidia

  gamedev

  polycount


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 MATH AND PHYSICS

  mathworld

  physicsworld







PLEASE LINK TO


  All rights reserved Morrowland © 2011  
Ronny André Reierstad