Home / MCQ Bank / Computer
Computer Miscellaneous In Java Difficulty: Medium

What will be the output of the following Java program? class Output { static void main(String args[]) { int x , y = 1; x = 10; if(x != 10 && x / 0 == 0) System.out.println(y); else System.out.println(++y); } }

Select the correct option to test your answer:

More Computer Questions

When using SQL*Plus, Oracle commands, column names, table names and all other database elements: What will be the output of the following C code? #include <assert.h> #include <stdio.h> void main() { int n=11; char str[50]="program"; assert(n >= 10); printf(" output: %d\n", n); assert(str != NULL); printf("output: %s\n", str); } What will be the output of the following C code? #include <stdio.h> #include <math.h> int main() { unsigned int i = -1; printf("%f\n", fabs(i)); return 0; } . . . . . . . . communicates with Nimbus through Zookeeper, starts and stops workers according to signals from Nimbus. Which of these operators does not perform relative-value comparisons?