What will be the output of the program?class SC2 { public static void main(String [] args) { SC2 s = new SC2(); s.start(); } void start() { int a = 3; int b = 4; System.out.print(' ' 7 2 ' '); System.out.print(a b); System.out.print(' ' a b ' '); System.out.print(foo() a b ' '); System.out.println(a b foo()); } String foo() { return 'foo'; } } - Study24x7
Social learning Network
study24x7

Default error msg

Login

New to Study24x7 ? Join Now
Already have an account? Login
22 Feb 2023 12:40 PM study24x7 study24x7

What will be the output of the program?class SC2 { public static void main(String [] args) { SC2 s = new SC2(); s.start(); } void start() { int a = 3; int b = 4; System.out.print(" " + 7 + 2 + " "); System.ou...

See more

A

9 7 7 foo 7 7foo

B

72 34 34 foo34 34foo

C

9 7 7 foo34 34foo

D

72 7 34 foo34 7foo

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles