Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Note: The language is basic java Section 2: In this section you will determine possible errors and correct them: (Please find the errors in each

Note: The language is basic java

Section 2: In this section you will determine possible errors and correct them: (Please find the errors in each of the 8 lines)

1) String name=bob;

2) int number=20/3.0;

3) double m=23;

4) char x=a;

5) if(num>10);

System.out.println(num is num);

6) if(x=10)

System.out.println(x is equal to x;

Else

System.out.println(x is not equal to 10);

7) int sum=0;

for(int i=0;i<10;i++)

sum=sum+i;

System.out.printf(Sum is %5.2f ,sum);

8) If you want to print the following line

BOB MARLEY

You can use the following printf statement

System.out.printf(%S %S%d ,BOB,MARLEY)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Neo4j Data Modeling

Authors: Steve Hoberman ,David Fauth

1st Edition

1634621913, 978-1634621915

More Books

Students also viewed these Databases questions

Question

Describe the appropriate use of supplementary parts of a letter.

Answered: 1 week ago