Advertise Here

Author Topic: Java Tips  (Read 6113 times)

0 Members and 1 Guest are viewing this topic.

Offline Ahrims_mage

  • SMF For Free Member
  • *
  • Posts: 24
    • View Profile
    • The Scapers

  • Total Badges: 11
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 10 Posts
Java Tips
« on: July 19, 2007, 01:31:14 pm »
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Java~Tips~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

getting started
Go download the latest version of JDK,jcreator, and javadocs and you're ready to start java!! (most of these can be found on the official java website located here )
Chapter 1 - Comments
Have you ever wanted to add coments to your code? well then do this.if you wanted to add a comment use this infront of the comment  /*  and this after the comment  */  so it would look like this:
EXAMPLE:
Code: [Select]
public void example() {             /*this is an example*/
}

this // lets you add a comment to 1 line 1 LINE ONLY you cannot do this:
EXAMPLE
Code: [Select]
//public void example() {
}
if you did that it would only take out this part public void example() { you can also use it to add comments to your code like this:
EXAMPLE
Code: [Select]
public void example() { //this is an example
}

Chapter 2 - definitions
  • || = Or
  • && = and
  • ! = not
  • boolean = Indicates that a value is an 8-bit whole number  :D .
  • void = Indicates that a method does not return a value.  :) .
credits Myself 95%,some tiny help by my friend 5%.
« Last Edit: January 01, 2008, 01:20:19 am by Ahrims_mage »

Offline Kalphiter

  • SMF For Free Full Member
  • *
  • Posts: 135
  • DE30AC #409
    • View Profile

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: Java Tips
« Reply #1 on: September 13, 2008, 09:34:22 am »
so so...

Chapter 2 - definitions
  • || = Or
  • && = and
  • ! = not
  • boolean = Indicates that a value is an 8-bit whole number  :D .
  • void = Indicates that a method does not return a value.  :) .
credits Myself 95%,some tiny help by my friend 5%.

!!
&&

Those are called operators.

public
means that it can be accessed by other classes.

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
6192 Views
Last post July 11, 2007, 12:40:04 pm
by doggiedoo86
3 Replies
9437 Views
Last post February 04, 2009, 07:44:58 pm
by nondier
1 Replies
4480 Views
Last post June 16, 2008, 02:30:19 am
by Supernovadelta
1 Replies
4805 Views
Last post July 02, 2008, 01:16:07 pm
by Jessie
10 Replies
11816 Views
Last post January 09, 2010, 01:57:39 pm
by hell hound