Java tutorial-Java programming?

What is Java programming language?

Java is a powerful programming language that can be run on different OS such as Windows, Mac, Linux, etc. It is a full OOP (Object-Oriented Programming) language which was developed by Sun Company. Java is more simpler to learn if we compare to C or C++ programming languages.

 

Java development requirements



-You need to download and install JDK tool kit from Sun's Java site.

-Add bin directory to your window PATH:

    Control Panel-->System-->Advanced tab/Advanced System Settings-->Environment Variable-->Select Path-->Edit-->type ";C:\Program Files\Java\jdkversion\Bin" at the end of the line. 

-Use Editor like Notepad, Eclipse, or JCreator to write and/or compile your Java code.

In the next pages of Java tutorial you will learn Java programming language from basic  to advanced concepts such as how to install Java development toolkit, how to compile and run the programs, understanding variables and data types, using comments, reading values from keyboard, printing values on the screen, string manipulation, conditional statements, loops, arrays, object-oriented programming, package, error handling, graphical user interface(GUI), file stream, database manipulation, and drawing, etc.





Comments

Dara comment

 Dara

This code might help you:

public class TowerofHanoi {
public static void main(String[] args){
tower(3,'A','B','C');
}

public static void tower(int n, char source, char temp,char destination){
if(n==1){
System.out.println("Move 1 disk from "+source+" to "+destination);
}
else{
tower(n-1, source,destination,temp);
System.out.println("Move 1 disk from "+source+" to "+destination);
tower(n-1, temp,source,destination);
}
}
}

10-22-2013
Muhak comment

 Muhak

Can anyone help me to write a recursive method in Java to move n disks from a source pillar to a destination pillar? Your help is appreciated.
Thanks

10-22-2013
ly comment

 ly

Immutable class point in Java (using final):

public final class Point {

private final int x;
private final int y;


public Point(int x, int y) {
this.x = x;
this.y= y;

}

public void printpt() {
System.out.println("("+x+","+y+")");
}


}

11-05-2012
hshg comment

 hshg

solution of this question in oop: Object of type String are immutable which means that once you create them you cannot change them:
Create a class called MyPoint which is also immutable and which has the following instance variable and methods:
1-x coordinate
2-y coordinate
3-print method to output the point.
Please answer the question thanks,,,

11-05-2012
Name:
Comment:
Enter the text:
CAPTCHA image

....................................................................................................................Home | Forum | About | Contact
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.
Copyright @ 2011-2013 worldbestlearningcenter. All Rights Reserved.
Home Programming Web DB & App Questions Exercises Tips Programs FAQs Download About
Computer-Wbest
Popular Pages
You might like