Knowee
Questions
Features
Study Tools

What will be the output of the program?public class Sample{    public static void main(String [] args)    {        int i = 10;        do while ( i < 10 )        System.out.print("The value of i is " + i);        while ( i > 10 ) ;    }}Select one:a.No output is produced.b.The value of i is 10 The value of i is 10c.Compilation errord.The value of i is 10

Question

What will be the output of the program?public class Sample{    public static void main(String [] args)    {        int i = 10;        do while ( i < 10 )        System.out.print("The value of i is " + i);        while ( i > 10 ) ;    }}Select one:a.No output is produced.b.The value of i is 10 The value of i is 10c.Compilation errord.The value of i is 10

🧐 Not the exact question you are looking for?Go ask a question

Solution

The

Similar Questions

Time left 0:13:05Question 1Not yet answeredMarked out of 1.00Flag questionTipsQuestion textWhat will be the output of the program?public class Sample{    public static void main(String [] args)    {        int i = 10;        do while ( i < 10 )        System.out.print("The value of i is " + i);        while ( i > 10 ) ;    }}Select one:a.No output is produced.b.The value of i is 10 The value of i is 10c.Compilation errord.The value of i is 10Clear my choiceQuestion 2Not yet answeredMarked out of 1.00Flag questionTipsQuestion textWhich of the following options remain true for case constants in a switch construct?Select one:a.The code with the switch construct gives a compilation error when there is a duplicate case label   b.If no case matches but there is a default label, then all statements after the matching default label in the switch block are executed in sequence.      c.If no case matches and there is no default label, then no further action is taken and the switch statement completes abnormallyd.If any one of the case constants has a match with the expression, then all statements after the matching case label in the switch block are executed in sequencee.If no case matches and there is no default label, then it will result in a compilation error

What is the output of the programme below?public static void main(String[] args) {     int x = 0;     while (x < 10) {          if (x & 2 == 0) {               System.out.print(x + “ “);          }          x++;     }}

What will be the output?public class Test{ public static void main(String args[]){ int i = 1; do{ i--; }while(i > 2); System.out.println(i); }}12-10

What is the output of the below program?public class Main{ public static void main(String[] args) { int a = 25; if(a > 5) System.out.print("Hi "); if(a < 20) System.out.print("Hello "); else System.out.print("Know Program "); }}

.What will be the output of the program ?public class Test { public static void main(String [] args) { signed int x = 10; for (int y=0; y<5; y++, x--) System.out.print(x + ", "); }}10, 9, 8, 7, 6,9, 8, 7, 6, 5,Compilation fails.An exception is thrown at runtime.

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.