Jump to content

Coolis®

Members
  • Posts

    2,285
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Coolis®

  1. 9 page with flame :O NEW DRAMA
  2. @gekasdapro pane mathe ligo PS gt m ponesas t matia apo to sig sou -.-
  3. Loipon Guys, exw skasei sta gelia me t last 5 pages... Min t gamate dn einai kaliteros PVP server... OK einai wreos eipame, ala oxi kai top min t gamisoume t thema... Ovenus Kanenas DN 3erei t 3ereis apo dev opote kane ena share T opoio dn exie 3ana ginei POST edw kana.... begun; { System.out.print("//banself"); if (// == banself) { number++; System.out.println(system); } else banself--; } end; oO
  4. Guys Eleos... O mafia einai wreos server an k pianoun pola hacks... episeis k o adm einai kalos ;) ala dn apantaei st message tr!! :@
  5. useless only you can see colors...
  6. Dominion aka core... event you login you listen flames... "GAMW TIN PANAGIA MOU" :O
  7. Coolis®

    Combat Arms

    Try to search?
  8. nice share.... Yeah i tried t make some connectors with VB but they was fail... Anyway i still working ;) I want make one connector like "e-globals"
  9. already posted... ;)
  10. Java Tutorial #1 Java Tutorial #2 Outline 1. Order of Operation ..1.1 Operator Precedence 2. Nested Flow Control Statements ..2.1 Nested If Statements ..2.2 Nested While/For Loops 3. Using Classes ..3.1 Instantiating a Class ..3.2 String Class ..3.3 Math Class ..3.4 Arrays 4. Methods ..4.1 Using Methods ..4.2 Creating Methods 5. File Input/Output ..5.1 File Input ..5.2 File Output 6. End 1. Order of Operation It is important to understand operator precedence. Go here for a complete list of operator precedence. 2. Nested Flow Control Statements It is very useful to know about nested flow control statements. 2.1 Nested If Statements An example of a nested If statement: if (a) if (b) do(); This nested If statement first tests whether or not a is true. If so, it proceeds and then tests whether or not b is true. If so, it proceeds to call the do() method. This can't be written as if (a && b)? Yes, it could be written that way; however, there may be special cases where someone will find it practical to use a nested if statement. Such as: if (a) { c++; // we want to increment C regardless of /b/'s value. if (b) die(); } 2.2 Nested While/For Loops An example of a nested For loop inside a While loop: boolean input = true; while (input) for (int i = 0; i < 3; i++) System.out.println(3-i); This code block will print out 3 to 1, each number on a separate line. You may have noticed that this will continuously print out: 3 2 1 Every pass through the while loop, it makes 3 passes through the for loop. Since input is always true, while's condition will always return true; thus, we have an infinite loop. 3. Using Classes Using classes is another very important part of Java programming. 3.1 Instantiating a Class Most classes need to be instantiated before being used. Insantiate? Instantiating is the act of creating an instance of a class; an object. The syntax for instantiation is: ClassName identifier = new ClassName; However, if the class requires any parameters to be passed, it could look this way: ClassName identifier = new ClassName(1, 2, 3); The following is also valid: ClassName identifier; identifier = new ClassName; The first line only creates a reference variable, a variable that points to an object. Since we have not instantiated an object, there is nothing to point to; thus, we have a null pointer You may have guessed that a null pointer points to nothing. This would be a good opening to explain Java's garbage collection. When a reference variable stops pointing to an object, and no other reference variables are pointing to it, that portion of the memory is automatically freed up and available. This is called garbage collection. 3.2 String Class Java uses a String class for string-type variables; however, it is quite different from normal classes. While the new operator can be used to instantiate a String object, it is not required. (Only true with the String class. No other classes can be instantiated without the new operator.) So this makes creating String objects much like creating regular variables of primitive data type. A String object can also be represented as an array of characters. String name = "name"; String lastName; lastName = "last name"; 3.3 Math Class The Math class is also unique. The Math class is static; therefore, its methods can be invoked directly through dot notation, without an object being instantiated. Example of square root function: System.out.println(Math.sqrt(16)); // displays 4 System.out.println(Math.sqrt(4)); // displays 2 3.4 Arrays Arrays can be difficult to grasp for a newborn programmer. I will try to explain them the best I can. An array holds multiple values under one identifier. To reference these values, you use an index number (or subscript) between two brackets, []. int[] grades = new int[2]; grades[0] = 10; grades[1] = 50; grades[2] = 100; The above example instantiates an array of int type, and of size 2. Array indexes start at 0, so it can technically hold 3 values. In index 0, 1, 2 and 3. You can also instantiate an array like so: int grades[] = new int[2]; I will be instantiating arrays this way from now on. Arrays are also easier to manage than multiple variables. Let's say you had 100 values you wanted to add 1 to. Which of the following would you prefer? var1++; var2++; var3++; ... var99++; var100++; or for (int i = 0; i < 100; i++) var[i]++; I think 100 lines vs 2 lines speaks for itself here. :) 4. Methods Now, on to methods. Isn't this fun? :D Methods are used to break up your driver's code and used for segments of code that would usually be repeated. 4.1 Using Methods Methods are fairly simple to use. They may return any type of data, or they may return nothing. A method with the return type void will not return anything. To call a method, you simply use the name of the method and if it has any parameters, include them. Example of a void method: displayNumbers(); This method obviously displays some numbers. It requires no parameters, and has nothing to return. Example of an int method: int x; x = add(1, 3); // x = 4 This method returns an integer, and in this case, it returns 4, the sum of 1 and 3. If it's not obvious already, to store the value a method returns, you need to store it in a variable of the same data type. 4.2 Creating Methods Methods consist of a method header and a body of code. In the method header, we have a visibility modifier, a return type, a method name and a list of parameters public int add(int a, int b) The above is the header for a method that adds two numbers together and returns the sum. public being the visibility modifier, which decides who can access this method. More on visibility modifiers will be discussed in Encapsulation. int is the data type of the value we return when the method is finished. "add" is the name of our method, the name we will use to call it. And then we have the parameter list, which defines variables that are local to the method. More on variable scopes will be discussed in Scopes. The full method looks like: public int add(int a, int b) { return a + b; // return sum of a and b } *Please give me critical feedback. I have NOT proof read this, so please, please tell me if you spot any typos or mistakes *Tutorial was writed about 1-2 hours by me and my friend programer (htpp://hackforum.net) *I hope this tutorial helps anyone in some way. ::) Took some time.
  11. BG 4/10 text: 4/10 Style 5/10
  12. 5/10 avatar same for sig Colors sucks...
  13. o kathenas me t pono tou...
  14. PvP: Boss jewlles +20 and tatoo of soul +20 = 10 euro SOLD OUT By FIX!!!!
  15. nai re..,.. ti tn vrika edw pera :D
  16. oO... oloi oi kaloi edw pera opos panda :D
  17. http://www.youtube.com/watch?v=jAYLnggLY4s&feature=rec-rev-rn-1r-2-HM hahaha :D
  18. oO This is pritty fvcking scary :O
  19. etsi opos t skeftese esu einai FAIL.... kathe edomada new custom? e? New patch ktlp? dn leei Episeis me 3k euro mporeis n ftia3eis enan server min p t kalitero san dubai i 17heros... kai o 17heros einai noobo k den exei dev pire pack apo dw ktlp... Pane agorase ena pack apo kapoion dev apo dw pera me 150-200 euro agorasw domain, host, dedicated st hopzone vale banner kai diafimisi gia 1 mina edw t idio... kai exeis sigora +300 atoma online...
  20. w00t mod rocks :D
  21. hahah pwned... He Only Ad his server...
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock