I have tried out all of your given programs, it's all working fine. Only you
need to take care or case sensitivity. I have modified your all programs
that I am writing here please compare it with your once. And you will see
that you are on a right way and just need to take care with sily mistakes.
One more thing there is no need to import java.lang package at every Java
program because this are the defalt package of java its already accessible.
public class Hello {
public static void main(String args[]){
System.out.println("Hello" + " " + "Java");
}
}
public class SquareRoot {
public static void main(String args[]){
double x=5;
double y;
y = Math.sqrt(x);
System.out.println("y = " + y);
}
}
public class Employee{
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();
}
}