What is the output of this code? | SoloLearn: Learn to code for FREE!

0

What is the output of this code?

Type Casting public static void main(String[ ] args) { double x = 1.5; double y = 2.65; sum((int)x, (int)y); } static void sum(int x, int y) { System.out.println(x + y); }

3/3/2021 5:31:28 AM

Hanmin Park

6 Answers

New Answer

+3

You can try it in code playground

+1

ty so much

+1

copy the code and paste the code in the java playgorind amd hit run then you will get your answer

0

And make a class too

0

0

The output is 3