Computer Science, asked by kethan07, 6 months ago

Find the errors in the following code snippet and correct them: [2]

boolean true = a;

If(false)

System.Out.Println("Nothing in here")

else

System.out.println(Correct this mistake)​

Answers

Answered by adityak280505
5

in 1st line

if i should be small

2nd line

out o should be small and print p should be small

semicolon missing at the end

3rd line

Double quotes should be put right next to the brackets before C and after e

Answered by Anonymous
5

Hey Buddy

Here's The Answer

__________________________________

In line

boolean true = a;

=> true is acting like a variable which isn't possible as true is a keyword and a Boolean variable can have false and true as its value.

CODE WITH CORRECTIONS

______________

boolean a = true;

if ( false ) {

System.out.println( "Nothing is here " );

} else {

System.out.println( " Correct this mistake " );

}

_______________

Hope It Helps

:)

Similar questions