- 1
What output results from this code?
public static void main(String[ ] args) { doSomething(4); } static void doSomething(int x) { System.out.println(x*x); }
13 Respuestas
+ 5
results = 16
+ 3
I will never understand those questions here.
The answer is 5 clicks away.
* click on "CODE PLAYGROUND" right near "DISCUSS"
* click on "NEW CODE"
* select "Java"
* paste your code
* click on "RUN"
Thats _way faster_ than create a Question, type a topic, paste code, type tags, submit and reload every 5s to get an answer after a hour.
AND - You learn something from it.
Edit: "CODE PLAYGROUND" == {}, "NEW CODE" == + on mobile devices ;)
+ 2
2
+ 1
I think 16.
0
The output will be 16.
4*4=16
0
16
0
What output results from this code?
public static void main(String[ ] args) {
doSomething(4);
}
static void doSomething(int x) {
System.out.println(x*x);
}
Answer-16
0
16
0
16
0
16
- 1
Answer will be 4
- 1
answer is :2
- 1
4