Java question
Where is the error in this statement?
import.text.NumberFormat;
Where is the error in this code sequence?
String s1 = "Hello";
String s2 = "ello";
String s = s1-s2;
Where is the error in this code sequence?
int a = Math.pow( 3, 4 );
System.out.println( a );
Q1.Where is the error in this statement?
import.text.NumberFormat;
Ans. The correct statement is import.java.text.NumberFormat
Q3 Where is the error in this code sequence?
int a = Math.pow( 3, 4 );
System.out.println( a );
Ans.
package dev;
import java.lang.Math; // import is to use
Math.pow()
class NumberFormate {
// driver code
public static void main(String args[])
{
double c=Math.pow(30, 2);
System.out.println(c);
}
}
Get Answers For Free
Most questions answered within 1 hours.