Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help. Write in Eclipse. is the value of each output statement? Please write your answer he provided line. c class Evaluation { olic static

Please help.

Write in Eclipse.

image text in transcribed

is the value of each output statement? Please write your answer he provided line. c class Evaluation \{ olic static void main(String arg[]) \{ int y=15,z=20; if (y>10) System.out.println("Union"); else System.out.println("Westfield"); //10. The output of the above if statement: if. (z==10(1)y>10 ) System. out.println("Dallas"), else System.out.println("Houston"); //11. The output of the above if statement: if (z==10(&&y>10) System.out.println( "Harrison"); else System.out.println("Kearny"); //12. The output of the above if statement: int [ ] list ={7,3,9,13}; System.out.println(list[2]); //13. System.out.println(list. length); //14. int a=2; switch (a) \{ case 1: System.out.println("Dog"); case 2: System. out.println("cat"); break; case 3: System.out.println("Tiger"); default: System.out.println("Animal"); \} //15. The output of the above switch statement: System.out.println(45/10); //16. System.out.println( 222);//17. System. out.println (2+12+1(2+1)1);//18. System.out.println(fun(3,2));//19. System. out.println(fun(6.2,4.5));//20. tic int fun(int m, int n ) { return (m+n);} tic String fun(double m, int n ) { return "Farm"; } tic String fun(double m, double n ) { return "House"; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions