This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
still i,m having the same error package system does not exist ,even i changed System instead of system/.
error ^ is pointing out the( . )dot
public class loopy
public static void main(string args)
System.out.println("before the loop");
System.out.println("in the loop");
System.out.println("this is after loop");
Please do not add new questions to an old thread. Fortunately I can create a new thread from your post.
Please copy‑and‑paste all code and errors. I ran your code and did not get the error you quoted. You did however manage to write string instead of String.
Java is case-sensitive. That means that "System" is not the same as "system", and "String" is not the same as "string". You have to get the spelling exactly right; if the name of a class has a capital letter, then you must write it exactly like that.
Class String is with a capital S. So that should be:
It's also easier to get used to the conventions if you use them yourself. Following standard Java conventions classes always start with a capital (like String and System), and variables and methods with a lower-case letter. So while it makes no difference to whether it works or not, Loopy is a better class name than loopy.