4. class Sample
{
public static void main(String args
int no
float kr.
n=25p=12
if n=25)
{
k=pow. 2)
System.out.println("The value ofp==+5)
}
else
1
r=Math square rootin):
System.out.println("The value of+n+ = +r)
} determine the error.
Answers
/tmp/lvzCWdMGtf/HelloWorld{public.java:6: error: ',', ')', or '[' expected
public static void main(String args
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:7: error: ';' expected
int no
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:8: error: ';' expected
float kr.
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:9: error: <identifier> expected
n=25p=12
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:9: error: ';' expected
n=25p=12
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:9: error: <identifier> expected
n=25p=12
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:9: error: ';' expected
n=25p=12
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:10: error: <identifier> expected
if n=25)
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:10: error: ';' expected
if n=25)
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:12: error: <identifier> expected
k=pow. 2)
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:13: error: unclosed string literal
System.out.println("The value ofp==+5)
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:15: error: illegal start of type
else
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:17: error: <identifier> expected
r=Math square rootin):
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:17: error: ';' expected
r=Math square rootin):
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:17: error: ';' expected
r=Math square rootin):
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:18: error: <identifier> expected
System.out.println("The value of+n+ = +r)
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:18: error: unclosed string literal
System.out.println("The value of+n+ = +r)
^
/tmp/lvzCWdMGtf/HelloWorld{public.java:19: error: reached end of file while parsing
}
^
18 errors