doing some example programs with packages( i am a java noob) and the following happened
Import packagename. Classname; it worked
Import packagename. *; it didnt work
Everything in the code was the same
Just the * method gives error. My friend with java 8 didnt have that prob.
Hence my qn (since i am a noob) is it an error with java version or did i screw up somewhere?
You just added an extra space between . and * Try with something like: import packagename.*; (I suppose here that your packagename is a full dot-separated path to your classes, like for example com.example.mypackage) Note: it is better to write the classname you import instead of everything (the star), as it import only the thing you need and not the whole classes in the package.
Обсуждают сегодня