This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes please help import pakage how Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "please help import pakage how" Watch "please help import pakage how" New topic

please help import pakage how

Sahil Ji

Joined: Apr 04, 2012
Posts: 6
//first class in import folder

package importpackage;

public class HelloWorld {
public void show(){
System.out.println("This is the function of the class HelloWorld!!");

//second class immediately above importpackage folder

import importpackage.*;

class CallPackage{
public static void main(String[] args){
HelloWorld h2=new HelloWorld();;

|--->importpackage ---->

C:\nisha\importpackage>javac *.java


C:\nisha>javac *****ERROR importpackage does not exist************

Please solve problem

Thanks in advance

Helen Ma
Ranch Hand

Joined: Nov 01, 2011
Posts: 451
Try this:
C:\nisha>javac importpackage\

In order to compile CallPackage under c:\nisha path, you need to specify where is.
Have you tried LearnNowOnline?
subject: please help import pakage how