all tasks

This commit is contained in:
Ingy döt Net 2013-04-11 01:07:29 -07:00
parent b83f433714
commit 68f8f3e56b
14735 changed files with 178959 additions and 0 deletions

View file

@ -0,0 +1,6 @@
public static void printAll(Object... things){
// "things" is an Object[]
for(Object i:things){
System.out.println(i);
}
}

View file

@ -0,0 +1,3 @@
printAll(4, 3, 5, 6, 4, 3);
printAll(4, 3, 5);
printAll("Rosetta", "Code", "Is", "Awseome!");

View file

@ -0,0 +1,2 @@
Object[] args = {"Rosetta", "Code", "Is", "Awseome!"};
printAll(args);

View file

@ -0,0 +1,3 @@
Object[] args = {"Rosetta", "Code", "Is", "Awseome,"};
printAll(args, "Dude!");//does not print "Rosetta Code Is Awesome, Dude!"
//instead prints the type and hashcode for args followed by "Dude!"

View file

@ -0,0 +1 @@
printAll((Object)args);