Alternative for System.out.println("message") in Java

Questions/Tutorials for any programming language not covered in other sections.
5 posts Page 1 of 1
Contributors
User avatar
Zulf
Serious Programmer
Serious Programmer
Posts: 441
Joined: Fri Jun 11, 2010 7:46 am

Paste this method into your .java file
Code: Select all
	public void message(String x, String y, String z) {
		System.out.println(x);
		System.out.println(y);
		System.out.println(z);
	}
Then type
Code: Select all
message("message1", "message2", "message3");
and it will print message1, 2, and 3 to a line. With just 1 line of code.:D

I JUST STARTED JAVA 1 HOUR AGO!
Image
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Java is to easy after C# lol (its almost the same...)
http://vagex.com/?ref=25000
User avatar
Zulf
Serious Programmer
Serious Programmer
Posts: 441
Joined: Fri Jun 11, 2010 7:46 am

Yeahh.:D
Image
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 444
Joined: Tue Feb 16, 2010 6:24 am

its the same as if you where doing + or - in math lol
public void message(String x, String y, String z) {
System.out.println(20-10);
System.out.println("20-10");
}

the quotes wouldnt make it do the math problem :)
Image
User avatar
Zulf
Serious Programmer
Serious Programmer
Posts: 441
Joined: Fri Jun 11, 2010 7:46 am

Livengood wrote:
its the same as if you where doing + or - in math lol
public void message(String x, String y, String z) {
System.out.println(20-10);
System.out.println("20-10");
}

the quotes wouldnt make it do the math problem :)
Idc mr. :D
Image
5 posts Page 1 of 1
Return to “Misc”