Knowee
Questions
Features
Study Tools

elect the correct answerWhat is the output of the following program?public class Score{    public static void main(String[] args)    {        int value = 121;        String var = (String)value;  //line 1        String temp = "122";        int data = (int)temp; //line 2        System.out.println(data + var);    }}OptionsCompilation error due to line 2Compilation error due to line 1243Compilation error due to line 1 and line 2

Question

elect the correct answerWhat is the output of the following program?public class Score{    public static void main(String[] args)    {        int value = 121;        String var = (String)value;  //line 1        String temp = "122";        int data = (int)temp; //line 2        System.out.println(data + var);    }}OptionsCompilation error due to line 2Compilation error due to line 1243Compilation error due to line 1 and line 2

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

Solution

Compilation error due to line 1 and line 2

Similar Questions

Test time left: 20:37Select the correct answerWhat is the output of the following program?public class Score{    public static void main(String[] args)    {        int value = 121;        String var = (String)value;  //line 1        String temp = "122";        int data = (int)temp; //line 2        System.out.println(data + var);    }}OptionsCompilation error due to line 1243Compilation error due to line 2Compilation error due to line 1 and line 2

Select the correct answerWhat is the output of the following program?public class Score{   public static void main(String[] args)   {     double data = 222.365;     int value = data;     System.out.println(data);   }}Options222222.365Runtime errorCompilation error

Select the correct answerWhat is the output of the following program?public class Score{    public static void main(String[] args)    {        System.out.println((125/50.0)*Integer.parseInt("10") + 70);    }}Options80Compilation error95.0Runtime error

Select the correct answerWhat is the output of the following program?public class Score{    public static void main(String[] args)    {        double data = 222.423;        int sum = 3;        float value = 2.1f;        System.out.println(data + sum + value);              }}Options222222.423227.52299222.5

Select the correct answerWhat is the output of the following program?public class Test{ public static void main(String []args){ int i = 0; for(i = 0; i < 10; i++){ continue; } System.out.println(i); }}OptionsCompilation error0109

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.