Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


bandhi lingamurthy
JAVA PACKAGES
2 Answer(s)      6 years and 2 months ago
Posted in : Java Beginners



Advertisement
View Answers

September 12, 2008 at 3:34 PM



Give a Look
First Package
---------------
package com.pack1;

public class ClassA {

public void Test(){
System.out.println("hello");
}
}

----------------
second Package
----------------
package com.pack2;

import com.pack1.*;
public class TestPackage {

public void Test1(){
ClassA a = new ClassA();
a.Test();
}
public static void main(String s[]){
new TestPackage().Test1();
}
}

Note:
-----------

When you use ClassA inside TestPackage, you get error
to overcome this problem you have to add first package in the javabuild path;

Thanks
Rajanikant


September 12, 2008 at 4:51 PM


Hi friend,


I am sending you a link. This link will help you.



Please visit for more information.


http://www.roseindia.net/java/master-java/index.shtml


Thanks.


Amardeep


Related Tutorials/Questions & Answers:
Java packages
Java packages  What restrictions are placed on the location of a package statement within a source code file
java.net packages - Java Beginners
java.net packages  Tell me some impotant classes to used in java.net packages?  hi friend, import java.net.*; import java.io...., http://www.roseindia.net/java/network/index.shtml Thanks
Advertisements
util packages in java
util packages in java  write a java program to display present date and after 25days what will be the date?   import java.util.*; import java.text.*; class FindDate{ public static void main(String[] args
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
creating packages in java
creating packages in java  Hi everybody, I am Rupesh Narayan, i faces a problem while creating package in core java. I write two programs that are described below:- 1.PackageDemo.java package javaclass; import java.io.*; public
Java Packages - Java Beginners
Java Packages  how to write a package by getting the inputs from the user?(ex: student details and staff qualification in one package)and also to compile and run this program
JAVA PACKAGES - Java Beginners
JAVA PACKAGES  I HAVE A DOUBT. I CRATED A PACKAGE BUT I AM NOT ABLE TO IMMPORT ANY FILES TO THE ANOTHER PACKAGE HOW CAN I IMPORT ANY PACKAGE FROM...://www.roseindia.net/java/master-java/index.shtml Thanks. Amardeep
packages - Java Beginners
Java package creation example  What is Package in Java? How can i create a package in Class
io packages - Java Beginners
io packages  How can I add two integers in java using io pacages
Java package,Java Packages
convention of packages A hierarchical naming pattern is used for java packages.... Packages in Core Java Package Description... Java Package      
packages
"); it compiles succesfully but when i do c:\world>java world.HelloWorld
Hi...doubt on Packages - Java Beginners
Package in java.. I have downloaded one program on Password Authentication... ..Explain me.  Hi friend, Package javax.mail The Java Mail API allows the developers to add mailing functionalities to their java applications
Regarding Documentation of Packages
Regarding Documentation of Packages  Hello How to get java packages ie documentation of classes ,Interfaces and methods from windows command prompt.In the sense Java.lang,java.awt,java.math etc
Packages needed for JDBC in Linux
Packages needed for JDBC in Linux  Can anyone tell me the packages needed to run a program with JDBC in Red Hat 5
Other Base Packages
Other Base Packages I/O For handling i/o of an application in java , java.io... for the development of the beans. Java Management Extensions (JMX) For monitoring and managing resources we incorporate this API which is termed as Java Management
Joomla Development Packages
Joomla Development Packages  In offshore services, we also offer a full-bodied package on various Joomla CMS like: Joomla Custom Templates Package Joomla Starter Package Joomla Standard Package Joomla Composite Package
Agra Travel Packages
Agra Travel Packages We are offering customized Agra Travel Packages which... customization of these packages based on your travel requirements. As an individual... as customized group travel packages. Agra group packages are for corporate
Taj mahal tour packages information needed
Taj mahal tour packages information needed  Hi, I am planning to visit Taj Mahal with my friends next week. Can anyone suggest me the Taj Mahal tour... package. More related tour packages are: 1) Golden Triangle Tours with Shimla
 

 

 

DMCA.com