Knowee
Questions
Features
Study Tools

Select the correct answerPredict the output of following Java program.class codetantra {   public static void main(String[] args) {    for(int i = 0; 0; i++)    {      System.out.println("Hello");      break;    }   } } OptionsCompiler errorEmpty OutputHelloRuntime error

Question

Select the correct answerPredict the output of following Java program.class codetantra {   public static void main(String[] args) {    for(int i = 0; 0; i++)    {      System.out.println("Hello");      break;    }   } } OptionsCompiler errorEmpty OutputHelloRuntime error

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

Solution

Compiler error

Similar Questions

Select the correct answerPredict the output of following Java program.?class CT {      public static void main(String args[]) {               int a;               System.out.println(a);     }   } Optionscompiler errorgarbage value0runtime error

Select the correct answerWhat will be the output of the following Java program? class CT {    public static void main(String args[]) {     try {       System.out.print("Codetantra" + " " + 1 / 0);      }     catch(ArithmeticException e) {    System.out.print("World");          }   } }OptionsCodetantraCodetantraWorldCodetantra WorldWorld

Select the correct answerWhat is the output of the following program? public class Test{  private String function(String temp, int data)  {    return ("CTC");  }  private String function(int data, String temp)  {    return ("CodeTantraCode");  }  public static void main(String[] args)  {    Test obj = new Test();    System.out.println(obj.function(4, "CTC"));    }}OptionsCompilation errorCodeTantraCodeCTCRuntime error

Select the correct answerWhat will be the output of the following Java code?  class Codetantra  {    final public int output(int x, int y) { return 1; }   }   class Program extends Codetantra   {     public int output(int x, int y) { return 2; }   }    public class result   {    public static void main(String args[])     {       Program object = new Program();       System.out.print("y is " + y.output(0, 1));      }   }Optionsy is : 0y is : 1Compilation ErrorAn exception is thrown at runtime

Select the correct answerWhat will be the output of the following Java code? class Name {     public static void main(String args[]) {          try {             int ct1 = 0;             int ct2 = 5;             int ct3 = ct2 / ct1;             System.out.print("Hello");         }         catch(Exception e) {             System.out.print("CodeTantra");         }      } }OptionsCodeTantraHelloHelloCodeTantraCompilation Error

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.