> import java.io.*;
> class hello{
> public static void main(string args[])
> system.out.print("hello java");
> }
> shows that ; is expected dont know why.
You're missing the left bracket for main
> 2 mport public package java.lang
> import public package java.lang.math
> class SquareRoot
> {
> public static void main(string args[])
> {
> double x=5;
> double y;
> y=math.sqrt(x);
> system.out.println("y="+y);
> }
> its shows indentifier expected and . expected
"math" is not a class. "Math" is. case sensitivity is
very important.
> 3.
> Import java.lang.
> Public class Employee extends java.lang
> {
> string employeeName;
> string employeeAddress;
> public Employee()
> {
> employeeName="Carol";
> employeeAddress="21 Rock st.";
> }
> public void DisplayDetails()
> {
> system.out.println("Name of an Employee
> is"+employeeName);
> system.out.println("Address of an employee
> is"+employeeAddress);
> }
> public static void main(string args[])
> {
> Employee employeeObject=new Employee();
> employeeObject.displayDetails();
> }
> }
"string" is not a class. "String" is.