Skip to main content

Posts

Showing posts with the label Java Test Upwork Answers 2019

Java Test Upwork Answers 2019

1. What is the output of the given program? public class Test93 {         private int x = 0;         public static void main(String[] args) {                 new Test93().test();         }         private int f(int x) { return ++x; }         private int g(int y) { return x++; }         private void test() {                 System.out.print( f(x)==f(x) ? "f" : "#" );                 System.out.print( g(x)==g(x) ? "g" : "#" );         } } Answers: • ## • #g • f# • fg 2. There are ...