|
You last visited: Today at 11:24
Advertisement
[Question] Coding Syntax
Discussion on [Question] Coding Syntax within the CO2 Programming forum part of the Conquer Online 2 category.
12/13/2010, 08:35
|
#16
|
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
|
Quote:
Originally Posted by InfamousNoone
Code:
class Program
{
public static int Cookies { get; private set; }
static void Main(string[] args)
{
Cookies = int.Parse(Console.ReadLine());
Console.WriteLine(Cookies > 0 ? "You have cookies!" : "You have no coookies!");
}
}
|
The point was to make it looks crazy xD
But u just learned me a thing, I never knew was possible. Cookies > 0 ?
|
|
|
12/13/2010, 08:47
|
#17
|
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 82
|
Quote:
Originally Posted by Syst3m_W1z4rd
The point was to make it looks crazy xD
But u just learned me a thing, I never knew was possible. Cookies > 0 ?

|
Ternary operation - Wikipedia, the free encyclopedia
|
|
|
12/13/2010, 19:46
|
#18
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
Quote:
Originally Posted by InfamousNoone
Saint (tao4229) and I despise Java, that's why I thought it'd be funny to post that. I'm glad other than us picked up on the joke.
|
|
|
|
12/13/2010, 23:25
|
#19
|
elite*gold: 0
Join Date: Nov 2009
Posts: 322
Received Thanks: 63
|
Quote:
|
Originally Posted by InfamousNoone
Console.WriteLine(Cookies > 0 ? "You have cookies!" : "You have no coookies!");
|
what does that do o-o
explain?
edit: nvm google is my friend.
Quote:
Originally Posted by ImmuneOne
|
lol'd
|
|
|
12/13/2010, 23:30
|
#20
|
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
|
Quote:
Originally Posted by xScott
what does that do o-o
explain?
lol'd
|
Read the link by ChingChong.
|
|
|
12/14/2010, 06:28
|
#21
|
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 82
|
that Java the Javatar is gold, saw it awhile ago.
|
|
|
12/14/2010, 06:42
|
#22
|
elite*gold: 0
Join Date: Nov 2006
Posts: 805
Received Thanks: 464
|
I saw someone posted that on cxp a few months back.
If I told you what I think of java i'd just be trollin'.
|
|
|
12/14/2010, 07:28
|
#23
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
I just linked nearly every programmer on my MSN list to that Java video.
Bricks were shat.
|
|
|
12/14/2010, 14:02
|
#24
|
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,001
|
Yah, java is fun. Here's a code to print "Hello world!":
PHP Code:
interface Printer { void print(Message message); }
class Message { private String message;
public Message(String message) { this.message = message; }
public void print(Printer printer) { printer.print(this); }
public String toString() { return message; } }
abstract class AbstractPrinterFactory { public static AbstractPrinterFactory getFactory() { return new SystemOutPrinterFactory(); }
public abstract Printer getPrinter(); }
class SystemOutPrinterFactory extends AbstractPrinterFactory { public Printer getPrinter() { return new SystemOutPrinter(); } }
class SystemOutPrinter implements Printer { public void print(Message message) { System.out.println(message); } }
class HelloWorld { public static void main(String[] args) { Message message = new Message("Hello world!"); AbstractPrinterFactory factory = SystemOutPrinterFactory.getFactory(); Printer printer = factory.getPrinter(); message.print(printer); } }
P.S Loved the video.
|
|
|
12/14/2010, 21:30
|
#25
|
elite*gold: 0
Join Date: Dec 2010
Posts: 341
Received Thanks: 255
|
Quote:
Originally Posted by tanelipe
Yah, java is fun. Here's a code to print "Hello world!":
PHP Code:
interface Printer {
void print(Message message);
}
class Message {
private String message;
public Message(String message) {
this.message = message;
}
public void print(Printer printer) {
printer.print(this);
}
public String toString() {
return message;
}
}
abstract class AbstractPrinterFactory {
public static AbstractPrinterFactory getFactory() {
return new SystemOutPrinterFactory();
}
public abstract Printer getPrinter();
}
class SystemOutPrinterFactory extends AbstractPrinterFactory {
public Printer getPrinter() {
return new SystemOutPrinter();
}
}
class SystemOutPrinter implements Printer {
public void print(Message message) {
System.out.println(message);
}
}
class HelloWorld {
public static void main(String[] args) {
Message message = new Message("Hello world!");
AbstractPrinterFactory factory = SystemOutPrinterFactory.getFactory();
Printer printer = factory.getPrinter();
message.print(printer);
}
}
P.S Loved the video.
|
Now don't get me wrong, I think Java is horrible.
But you're over exaggerating :P
Code:
package helloworld;
public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Now if you wanted to show something horrible in Java, show how you open and work with files! Ugh!
|
|
|
12/15/2010, 05:32
|
#26
|
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 82
|
make your own framework wrapped around java's file IO system, if you want it spoonfed to you like .net does.
|
|
|
12/15/2010, 08:07
|
#27
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
Thing is though, .NET allows you to chose whether to be spoon fed, or whether to PInvoke and do it all yourself. Java on the other hand ***** slaps you with JNI which is just such a pain.
|
|
|
12/15/2010, 08:12
|
#28
|
elite*gold: 0
Join Date: Oct 2010
Posts: 5
Received Thanks: 0
|
if(condition)
{
statement
}
|
|
|
12/15/2010, 13:39
|
#29
|
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 82
|
Quote:
Originally Posted by InfamousNoone
Thing is though, .NET allows you to chose whether to be spoon fed, or whether to PInvoke and do it all yourself. Java on the other hand ***** slaps you with JNI which is just such a pain.
|
if you work with dll's a lot (which i assume you do) then i can understand why you dislike java
|
|
|
12/15/2010, 23:23
|
#30
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
The idea of J# (or just the general idea of coding an extension on top of the .NET framework that would allow Java code to compile to IL) and extend the language further to support some of .NET's features was brilliant. It's too bad it was discontinued.

Is also brilliant too, but looks like it's not being updated any further either.
|
|
|
 |
|
Similar Threads
|
Coding npc(last question)
06/17/2010 - CO2 Private Server - 20 Replies
hi, i have conquer pserver,
i need a video who show me all the steps of changing the price of an npc( breeder for exemple)
pelase guys, i know it's a lot but i'm so needding it
thanks
|
[Question]Syntax for Pet..
03/22/2010 - EO PServer Hosting - 5 Replies
Hey, You know when you compose on top left it says " So and so have composed so and so." well something like that, Whats the Syntax for the pet? Like the Syntax %user_name = Display of the character name. I need to where i can find it and after 50* where the orange fireworks and the GM broadcast saying "So and so's pet is this many stars congratz"
http://i430.photobucket.com/albums/qq23/MikeMadMa n_album/lol-1.jpg
Just all smudgy cuz i wanna keep my privacy O_O
Thanks.
|
Question About Coding...
07/03/2008 - Conquer Online 2 - 12 Replies
Ok I Need Sum Help With A PvP Server It Has infinity Stamina taths noth the probleem but HERC is (they spam it like hell ) How Could Our Team Delet Skill "Herc" or make the command admin Thx For Help If u Wanne Join Us go TO DragonCO :P
|
All times are GMT +1. The time now is 11:24.
|
|