1.) Where is the error in this code sequence?
double pi = Math(PI);
System.out.println(pi);
I know it's something simple, but I can't think of it.
2.) You coded the following on lines 10-12 oc class Test.java:
String s;
int l= s.length();
System.out.println("length is " + 1);
When you compile you get the following message:
Test.java:11: variable s might not have been initialized.
int i=s.length();
1 error
Explain what the problem is and how to fix it.
2007-02-04
16:41:09
·
4 answers
·
asked by
Chestnut C
1
in
Computers & Internet
➔ Programming & Design