Page 1 of 1

Introduction to Java with Eclipse Rate Topic: -----

#1 Java Student  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 21
  • View blog
  • Posts: 480
  • Joined: 05-February 10

Posted 28 February 2010 - 12:51 PM

Requirements:
1.) Willingness to learn
2.) Know the basics of a computer


Instructions:
Before we begin your going to need a program to start programming with
go to http://www.eclipse.org/ you will be presented with a bunch of
downloads, but should download you one that is presented in this picture
Attached Image
and you will know which is the right one to download. Assuming you have
done the installation process we can now begin !

Part 1.) Let's begin:
Before we begin, you should have Eclipse open and start a New project
Attached Image
Then we're going to need classes which i will explain later
Attached Image
When creating classes, we allways need 1 main class so the project
knows where to begin
Attached Image
Once were done we should automatically have what looks like this
Attached Image

Part 2.) Lesson:
Here are some things you should know before you continue onto our exercise!

Definitions:
Variable - is a facility for storing data.

Class - Java is class-based programming, which refers to the style of object-oriented programming in which inheritance is achieved by defining classes of objects.

Primitive data types:
int - aka Integer, you've probably heard if you have ever
been in a Math class but in programming it's a little bit
different. It can be a negative, neutral or positive number.

String - Is basically a string of words or letters
example: "Hello world!"

Boolean - Your probably thinking "Wow boolean thats a weird word".
It really just has one of two values; true or false.

Note* - There are more data types but they will not be discuss as this is
a begineer lesson.

Statement structure:
A class is made up of a bunch of different statement, the structure for creating a statement goes like this...
(data type) (variable name) = (data value);
Your probably woundering what the ";" semicolon is doing there, in Java we allways end our statements with
semicolon.
An example of assignment statements are:
int tax = 10;
String str = "Hello world!";


Strings should allways have quotations marks around them.
To print something to the console to the user can see it we type "System.out.println();"
and inside the parenthesis we have what we want to display.
Part3.) Exercise:

Let's begin making our very first console program ! :bigsmile:

This is a prime example of a very simple console program named "Hello world!"
Input:
public class NameOfClasshere {

	public static void main(String[] args) {
                int anumber = 10;
		String hi = "Hello World! "; // Creating a variable named "hi" that hold the text "Hello world!"

		System.out.println(hi + anumber); // Calling "hi" and "anumber" variable to display to the user
	}

}



Output:
Attached Image

Is This A Good Question/Topic? 3
  • +

Replies To: Introduction to Java with Eclipse

#2 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3093
  • View blog
  • Posts: 19,139
  • Joined: 14-September 07

Posted 20 March 2010 - 05:27 PM

Approved, but I changed the title to more accurately reflect what is actually discussed in this tutorial. It's more of a "how to" start with Eclipse rather then a comprehensive introduction to the Java language.
Was This Post Helpful? 0
  • +
  • -

#3 darkvai  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 7
  • Joined: 23-March 10

Posted 23 March 2010 - 07:39 AM

I always thought we had to start(declare) string with a Capital letter..

You know
String str = "hello world";


and not

string str = "hello world";


:gun_bandana:
Was This Post Helpful? 1
  • +
  • -

#4 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3093
  • View blog
  • Posts: 19,139
  • Joined: 14-September 07

Posted 24 March 2010 - 07:18 AM

Most likely a typo, nothing malicious. I'll fix it. Good catch!
Was This Post Helpful? 0
  • +
  • -

#5 Java Student  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 21
  • View blog
  • Posts: 480
  • Joined: 05-February 10

Posted 24 March 2010 - 06:35 PM

KYA said:

Approved, but I changed the title to more accurately reflect what is actually discussed in this tutorial. It's more of a "how to" start with Eclipse rather then a comprehensive introduction to the Java language.


Ah yes thanks :bigsmile:

I hope this helps at least a few people,
words can only go so far sometimes you
need visual images to get the message
across.
Was This Post Helpful? 0
  • +
  • -

#6 dhussey111  Icon User is offline

  • New D.I.C Head

Reputation: -40
  • View blog
  • Posts: 33
  • Joined: 22-September 12

Posted 06 October 2012 - 08:29 AM

This is really good i love it i want to learn GUI for eclipse with help of java.. can you guide me to a better place..?
Was This Post Helpful? 0
  • +
  • -

#7 samah awad  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 29-October 12

Posted 29 October 2012 - 09:40 AM

I tried a lot to DOWNLOAD the program, but to no avail
Was This Post Helpful? 0
  • +
  • -

#8 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8890
  • View blog
  • Posts: 33,338
  • Joined: 12-June 08

Posted 29 October 2012 - 09:44 AM

You'll need to be a bit more specific than that.
Was This Post Helpful? 0
  • +
  • -

#9 samah awad  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 29-October 12

Posted 30 October 2012 - 02:54 PM

^_^Finally I did it
Was This Post Helpful? 0
  • +
  • -

#10 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8890
  • View blog
  • Posts: 33,338
  • Joined: 12-June 08

Posted 30 October 2012 - 02:56 PM

Congrats on downloading the app!
Was This Post Helpful? 0
  • +
  • -

#11 k3y  Icon User is offline

  • D.I.C Head

Reputation: 36
  • View blog
  • Posts: 205
  • Joined: 25-February 12

Posted 24 November 2012 - 10:30 AM

Great tutorial lad, here are some pretty good video tutorials that can go alongside those:
http://sourceforge.n.../Version%201.0/
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1