Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. 3,1,public class WhatIsTheOutput\n\t{\n\tpublic static void main(String [] args)\n\t{\n\t\tSystem.out.println("Hello ");\n\t\tSystem.out.println("world"); \n\t}\n},Helloworld,Hello world,Hello\nworld,hello world,2,The output is Hello world
  2. 3,2,public class WhatIsTheOutput\n{\n\tpublic static void main(String [] args)\n\t\tSystem.out.println("Hello 2 + 2" + 2 + 3);\n\t}\n},Hello2223,Hello 2 + 223,Hello45,Hello 2 + 25,2,The output is Hello 2 + 223
  3. 3,3,public class WhatIsTheOutput\n{\n\tpublic static void main(String [] args)\n\t\tSystem.out.printf("%05d\n",10);\n\t}\n},0510,10, 10,00010,4,The output is 00010
  4. 3,4,public class WhatIsTheOutput\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tint a = 3, b = 4;\n\t\tString results = "";\n\t\tresults += (++a + b) + " ";\n\t\tresults += (a++ + b);\n\t\tresults += + (--a) + " ";\n\t\tresults += (a--);\n\t\tresults += a;\n\t\tSystem.out.print(results);\n\t\t}\n},8 84 43,88443,8 8 4 4 3, 8 8 443,1,The output is 8 84 43
  5. 3,5,public class WhatIsTheOutput\n{\n\tpublic static void main (String [] args)\n\t{\n\t\tchar c = 'a';\n\t\tint i = c;\n\tSystem.out.println(c + "\t" + i);\n\t}\n},a\tc,a\t97,a\t97\ta,c\ti,2,The output is a\t97
  6. 3,6,public class WhatIsTheOutput\n{\n\tpublic static void main(String [] args)\n\t\tSystem.out.format("The square root of %d is %f.%n", 2, 1.4142);\n\t}\n},The square root of 2.00 is 1.4142,The square root of 2 is 1.4142,The square root of 2.00 is 1.414200,The square root of 2 is 1.414200,4,The output is The square root of 2 is 1.414200
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement