SlideShare a Scribd company logo
1 of 30
Packages and Classpath


Objective :

  On completion of this period, you would be
  able to learn
  • Packages
  • Concept of classpath




                                               1
Recap



Final class
• Classes that can not be inherited




                                      2
Packages

• What is a package?
  • We already know how to organize our
    files
  • We use directories for doing so
  • The advantage is
      • Easy maintenance of files
  • If we want to organize our java class files
      • System provides a facility
         • Packages

                                                  3
Packages    Contd..


• Package
  • Name provided to a group of classes
  • A collection of related classes and
    interfaces
  • A namespace management tool provided
    by Java



                                           4
Packages       Contd..
• Directory structures that organize classes and
  interfaces
• Mechanism for software reuse
• Can be compared to directories or folders


• Files : Directories :: Class files : Packages




                                                   5
                                                       5
Naming Convention

•   Follows standard Java naming rules
•   Case sensitive
•   Generally written in small case
•   Every name must be unique
•   Packages in the Java language itself begin with
    java




                                                  6
Naming Convention Contd..

• Prefix a domain name to the preferred package
  name
   • Avoids name conflict when used in Internet
   • for example, com.company.region.package
      • com.ibm.in.banking




                                                  7
Packages


Java packages are classified in to two types :
• Java API packages ( system defined packages)
• User defined packages




                                                 8
Packages       Contd..
•The packages are organized in a hierarchical structure as
shown in the figure

          java. awt

                               Package containing awt package
          COLOUR

         GRAPHICS
                                Package containing AWT classes

           FONT
            …




          IMAGE                   AWT classes containg methods
                          Hierarchical representation of java.awt
                          package. The package named java contains the
                          package awt , which in turn contains various
        Fig. 26.1         classes required for implementing graphical
                          user interface
                                                                   9
System defined packages
• Some examples
  • java.io
  • java.util
  • java.lang
  • java.awt
  • java.awt.event
  • java.sql
  • java.net
  • java.math
  • java.io
                                   10
Package Statement
• Used to create a package
• Should be the first statement in a Java source
  file
• Syntax
  – package nameOfPackage;

  Keyword
                 User-defined name


 • eg. : package cis; // cis – college information system
 • nameOfPackage is a sequence of names separated by .
 (dot)

                                                            11
Package Statement Contd..
• Java supports the package hierarchy
• Specified by multiple names in a package
  statement, separated by . (dot)

  – eg. : package firstPackage.secondPackage;

• Advantage is
  – Group related classes into a package and
    then group the related packages into a larger
    package
                                                12
Packages
Example :
package firstPpackage ; // package declanation
public class firstClass // class definition
{
    ----------- ( body of class )
    -----------
 }
• Here the package name is ‘firstPackage’
• The class ‘firstClass’ is now considered a part of this
   package
• This listing would be saved as a file called firstClass.java
• When the source file is compiled, java compiler will
  create a class file and store it in the ‘firstPackage’
  directory                                            13
Example Program
// A simple package
package coreBank;

class Balance {                  package statement

 String name;
 double bal;

 Balance(String n, double b) {
   name = n;
   bal = b;
 }
                                                     14
Example Program Contd..
void show() {
    if(bal<0)
      System.out.print("-->> ");
      System.out.println(name + ": $" + bal);
  }
}




                                                15
Example Program Contd..
 package coreBank;
 public class AccountBalance {
    public static void main(String args[]) {
      Balance current[] = new Balance[3];
      current[0] = new Balance("K. J. Fielding", 123.23);
      current[1] = new Balance("Will Tell", 157.02);
      current[2] = new Balance("Tom Jackson", -12.33);
      for(int i=0; i<3; i++) current[i].show();
  }
}



                                                      16
Compiling and Executing
• On compilation
  • The package statement creates
    directory(folder) with the name of the package
  • That is, folder named ‘coreBank’ is created
• While executing
  • Qualify the class name with its package name
  • That is, coreBank. AccountBalance




                                                17
Compiling and Executing                   Contd..

• Compiling
  • javac AccountBalance.java

• Executing
  • java coreBank.AccountBalance


         Class name to be qualified with its package




                                                         18
Default Package

• System provides when you do not create one
• It is the current working directory




                                               19
Advantages of Packages


• Easily determine how classes and
  interfaces are related
• Avoids namespace conflict
• Implement       application-wise  access
  protection
• Provides a mechanism for class reuse




                                             20
Classpath
• Tells applications where to find third-party and
  user-defined classes
• The search order used by java tools
  • Java platform (bootstrap) classes, any extension
    classes, and the class path
• Two ways to change class path
  • -classpath option change the class path of java tools
  • CLASSPATH environment variable
• The first approach is preferred

                                                            21
Setting the Classpath
• -classpath
     • jdkTool -classpath path1;path2...
        – eg. : javac –classpath d:projectclasses


• CLASSPATH environment variable
     • eg. : SET CLASSPATH d:projectclasses




                                                      22
Classpath and Archive files
• Classes can be stored either in directories
  (folders) or in archive files ( jar files)
   • eg. The Java platform classes are stored in rt.jar.


• Class path to the archive files
   • For a .jar or .zip file that contains .class files, the path
     ends with the name of the .zip or .jar file

   • eg. : javac –classpath d:projectutilClasses.zip
   • eg. : javac –classpath e:xmlxalan.jar
                                                                23
Multiple Path Entries
• Multiple path entries are separated by semi-colons
• To find class files in the following directories
  • C:javaMyClasses
  • C:javaOtherClasses
• set the classpath to:
  • C:> java –classpath C:javaMyClasses;C:javaOtherClasses
• Order of classpath entries is important



                                                           24
Summary
• In this class we have discussed
   • Package
   • Naming convention
   • Creating a package
   • Concepts of classpath




                                    25
Frequently Asked Questions
1. What is a package ?

2. What are Java’s system defined packages ?

3. What are the advantages of packages ?

4. How to set classpath for your Java
   application ?


                                           26
Quiz

1.An package is a collection of

  1. classes
  2. Interfaces
  3. editing tools
  4. classes and interfaces




                                  27
Quiz             Contd..




2.Which keyword is used to define package

  1. packages
  2. package
  3. packaging
  4. directory




                                            28
Quiz               Contd..




3.A class path specifies

  1. A list of paths for java source files
  2. A list of paths for image files
  3. A list of paths for the required classes and
     zip files
  4. None



                    CM604.26                     29
Quiz              Contd..

4.Which of the following statements is true ?

  1. There can be any number of package
     statements in a java file
  2. Package statement can be any where in the
     java file
  3. There can be only one package statement in
     a java file
  4. None



                      CM604.26                    30

More Related Content

What's hot

Java - Packages Concepts
Java - Packages ConceptsJava - Packages Concepts
Java - Packages ConceptsVicter Paul
 
OCA JAVA - 1 Packages and Class Structure
 OCA JAVA - 1 Packages and Class Structure OCA JAVA - 1 Packages and Class Structure
OCA JAVA - 1 Packages and Class StructureFernando Gil
 
Pi j4.1 packages
Pi j4.1 packagesPi j4.1 packages
Pi j4.1 packagesmcollison
 
chap 10 : Development (scjp/ocjp)
chap 10 : Development (scjp/ocjp)chap 10 : Development (scjp/ocjp)
chap 10 : Development (scjp/ocjp)It Academy
 
Advance java kvr -satya
Advance java  kvr -satyaAdvance java  kvr -satya
Advance java kvr -satyaSatya Johnny
 
Packages access protection, importing packages
Packages   access protection, importing packagesPackages   access protection, importing packages
Packages access protection, importing packagesTharuniDiddekunta
 
Java Programming and J2ME: The Basics
Java Programming and J2ME: The BasicsJava Programming and J2ME: The Basics
Java Programming and J2ME: The Basicstosine
 
Advanced java jee material by KV Rao sir
Advanced java jee material by KV Rao sirAdvanced java jee material by KV Rao sir
Advanced java jee material by KV Rao sirAVINASH KUMAR
 
Class notes(week 7) on packages
Class notes(week 7) on packagesClass notes(week 7) on packages
Class notes(week 7) on packagesKuntal Bhowmick
 

What's hot (19)

Package In Java
Package In JavaPackage In Java
Package In Java
 
Javapackages 4th semester
Javapackages 4th semesterJavapackages 4th semester
Javapackages 4th semester
 
Java packages oop
Java packages oopJava packages oop
Java packages oop
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Java - Packages Concepts
Java - Packages ConceptsJava - Packages Concepts
Java - Packages Concepts
 
Packages in java
Packages in javaPackages in java
Packages in java
 
OCA JAVA - 1 Packages and Class Structure
 OCA JAVA - 1 Packages and Class Structure OCA JAVA - 1 Packages and Class Structure
OCA JAVA - 1 Packages and Class Structure
 
Java packages
Java packagesJava packages
Java packages
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Pi j4.1 packages
Pi j4.1 packagesPi j4.1 packages
Pi j4.1 packages
 
Access modifiers
Access modifiersAccess modifiers
Access modifiers
 
chap 10 : Development (scjp/ocjp)
chap 10 : Development (scjp/ocjp)chap 10 : Development (scjp/ocjp)
chap 10 : Development (scjp/ocjp)
 
Advance java kvr -satya
Advance java  kvr -satyaAdvance java  kvr -satya
Advance java kvr -satya
 
Packages access protection, importing packages
Packages   access protection, importing packagesPackages   access protection, importing packages
Packages access protection, importing packages
 
Java Programming and J2ME: The Basics
Java Programming and J2ME: The BasicsJava Programming and J2ME: The Basics
Java Programming and J2ME: The Basics
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Java basics
Java basicsJava basics
Java basics
 
Advanced java jee material by KV Rao sir
Advanced java jee material by KV Rao sirAdvanced java jee material by KV Rao sir
Advanced java jee material by KV Rao sir
 
Class notes(week 7) on packages
Class notes(week 7) on packagesClass notes(week 7) on packages
Class notes(week 7) on packages
 

Viewers also liked

9 b = 2 agung banowo irawan eka pradittya
9 b = 2 agung banowo   irawan eka pradittya9 b = 2 agung banowo   irawan eka pradittya
9 b = 2 agung banowo irawan eka pradittyaEka Dhani
 
9 leonessa altamura 1-3 puglia in rosa volley
9  leonessa altamura 1-3 puglia in rosa volley9  leonessa altamura 1-3 puglia in rosa volley
9 leonessa altamura 1-3 puglia in rosa volleyredazione gioianet
 
9-July-2014 Open Source Software Panel - GNOME Outreach Program for Women int...
9-July-2014 Open Source Software Panel - GNOME Outreach Program for Women int...9-July-2014 Open Source Software Panel - GNOME Outreach Program for Women int...
9-July-2014 Open Source Software Panel - GNOME Outreach Program for Women int...Women Who Code
 
9 cara sukses agar paru bersih
9 cara sukses agar paru bersih9 cara sukses agar paru bersih
9 cara sukses agar paru bersihMudhofar Khanif
 
Co-creation by VOX
Co-creation by VOXCo-creation by VOX
Co-creation by VOXMillionYou
 
9 e asset-sima-proposal penawaran software aplikasi sistem informasi manajeme...
9 e asset-sima-proposal penawaran software aplikasi sistem informasi manajeme...9 e asset-sima-proposal penawaran software aplikasi sistem informasi manajeme...
9 e asset-sima-proposal penawaran software aplikasi sistem informasi manajeme...Ahmad SKT
 
9 job roles task
9 job roles task9 job roles task
9 job roles taskIna Bayson
 
9.) godzilla
9.) godzilla9.) godzilla
9.) godzillaKatemedia
 
9 day New Zealand south island tourer touring route
9 day New Zealand south island tourer touring route9 day New Zealand south island tourer touring route
9 day New Zealand south island tourer touring routeFish Yee
 
9 Licoes Que Nao Aprendes Nas Escolas de Negocios
9 Licoes Que Nao Aprendes Nas Escolas de Negocios9 Licoes Que Nao Aprendes Nas Escolas de Negocios
9 Licoes Que Nao Aprendes Nas Escolas de NegociosRui Lemos
 
Monitorizare media 20 - 26 august 2012
Monitorizare media 20 - 26 august 2012Monitorizare media 20 - 26 august 2012
Monitorizare media 20 - 26 august 2012Campania INPCP
 
9 didactica en educació n superior (está súper)
9 didactica en educació n superior (está súper)9 didactica en educació n superior (está súper)
9 didactica en educació n superior (está súper)Adalberto
 
Electronavigation Bronchoscopy
Electronavigation BronchoscopyElectronavigation Bronchoscopy
Electronavigation BronchoscopyAllina Health
 
9 excusas que debes ignorar para tu marca personal
9 excusas que debes ignorar para  tu marca personal9 excusas que debes ignorar para  tu marca personal
9 excusas que debes ignorar para tu marca personalHilaida Terán Delgado
 

Viewers also liked (19)

9 b = 2 agung banowo irawan eka pradittya
9 b = 2 agung banowo   irawan eka pradittya9 b = 2 agung banowo   irawan eka pradittya
9 b = 2 agung banowo irawan eka pradittya
 
9 leonessa altamura 1-3 puglia in rosa volley
9  leonessa altamura 1-3 puglia in rosa volley9  leonessa altamura 1-3 puglia in rosa volley
9 leonessa altamura 1-3 puglia in rosa volley
 
9-July-2014 Open Source Software Panel - GNOME Outreach Program for Women int...
9-July-2014 Open Source Software Panel - GNOME Outreach Program for Women int...9-July-2014 Open Source Software Panel - GNOME Outreach Program for Women int...
9-July-2014 Open Source Software Panel - GNOME Outreach Program for Women int...
 
9 cara sukses agar paru bersih
9 cara sukses agar paru bersih9 cara sukses agar paru bersih
9 cara sukses agar paru bersih
 
Co-creation by VOX
Co-creation by VOXCo-creation by VOX
Co-creation by VOX
 
9 e asset-sima-proposal penawaran software aplikasi sistem informasi manajeme...
9 e asset-sima-proposal penawaran software aplikasi sistem informasi manajeme...9 e asset-sima-proposal penawaran software aplikasi sistem informasi manajeme...
9 e asset-sima-proposal penawaran software aplikasi sistem informasi manajeme...
 
9 job roles task
9 job roles task9 job roles task
9 job roles task
 
9 civics 3.8.11
9 civics 3.8.119 civics 3.8.11
9 civics 3.8.11
 
9 digital barriers
9 digital barriers9 digital barriers
9 digital barriers
 
9.) godzilla
9.) godzilla9.) godzilla
9.) godzilla
 
9 day New Zealand south island tourer touring route
9 day New Zealand south island tourer touring route9 day New Zealand south island tourer touring route
9 day New Zealand south island tourer touring route
 
9 Licoes Que Nao Aprendes Nas Escolas de Negocios
9 Licoes Que Nao Aprendes Nas Escolas de Negocios9 Licoes Que Nao Aprendes Nas Escolas de Negocios
9 Licoes Que Nao Aprendes Nas Escolas de Negocios
 
9 arabic templates
9 arabic templates9 arabic templates
9 arabic templates
 
9 desarrollo tecnológico
9 desarrollo tecnológico9 desarrollo tecnológico
9 desarrollo tecnológico
 
Monitorizare media 20 - 26 august 2012
Monitorizare media 20 - 26 august 2012Monitorizare media 20 - 26 august 2012
Monitorizare media 20 - 26 august 2012
 
9 didactica en educació n superior (está súper)
9 didactica en educació n superior (está súper)9 didactica en educació n superior (está súper)
9 didactica en educació n superior (está súper)
 
9 knowledge café summary
9 knowledge café summary9 knowledge café summary
9 knowledge café summary
 
Electronavigation Bronchoscopy
Electronavigation BronchoscopyElectronavigation Bronchoscopy
Electronavigation Bronchoscopy
 
9 excusas que debes ignorar para tu marca personal
9 excusas que debes ignorar para  tu marca personal9 excusas que debes ignorar para  tu marca personal
9 excusas que debes ignorar para tu marca personal
 

Similar to 9 cm604.26

Similar to 9 cm604.26 (20)

Java Packages
Java Packages Java Packages
Java Packages
 
packages.ppt
packages.pptpackages.ppt
packages.ppt
 
packages.ppt
packages.pptpackages.ppt
packages.ppt
 
packages unit 5 .ppt
packages  unit 5 .pptpackages  unit 5 .ppt
packages unit 5 .ppt
 
Packages
PackagesPackages
Packages
 
javapackage
javapackagejavapackage
javapackage
 
7.Packages and Interfaces(MB).ppt .
7.Packages and Interfaces(MB).ppt             .7.Packages and Interfaces(MB).ppt             .
7.Packages and Interfaces(MB).ppt .
 
Chap1 packages
Chap1 packagesChap1 packages
Chap1 packages
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Classpath
ClasspathClasspath
Classpath
 
Package.pptx
Package.pptxPackage.pptx
Package.pptx
 
20-packages-jar.ppt
20-packages-jar.ppt20-packages-jar.ppt
20-packages-jar.ppt
 
Package in Java
Package in JavaPackage in Java
Package in Java
 
Chapter 1 :
Chapter 1 : Chapter 1 :
Chapter 1 :
 
Java packags
Java packagsJava packags
Java packags
 
PACKAGES, MULTITHREADED PROGRAMMING & MANAGING ERRORS AND EXCEPTIONS in java
PACKAGES, MULTITHREADED PROGRAMMING & MANAGING ERRORS AND EXCEPTIONS in javaPACKAGES, MULTITHREADED PROGRAMMING & MANAGING ERRORS AND EXCEPTIONS in java
PACKAGES, MULTITHREADED PROGRAMMING & MANAGING ERRORS AND EXCEPTIONS in java
 
OOP_packages_222902019.pptx
OOP_packages_222902019.pptxOOP_packages_222902019.pptx
OOP_packages_222902019.pptx
 
OOP_packages_222902019.pptx
OOP_packages_222902019.pptxOOP_packages_222902019.pptx
OOP_packages_222902019.pptx
 
Unit 4 Java
Unit 4 JavaUnit 4 Java
Unit 4 Java
 
Packages in java
Packages in javaPackages in java
Packages in java
 

More from myrajendra (20)

Fundamentals
FundamentalsFundamentals
Fundamentals
 
Data type
Data typeData type
Data type
 
Hibernate example1
Hibernate example1Hibernate example1
Hibernate example1
 
Jdbc workflow
Jdbc workflowJdbc workflow
Jdbc workflow
 
2 jdbc drivers
2 jdbc drivers2 jdbc drivers
2 jdbc drivers
 
3 jdbc api
3 jdbc api3 jdbc api
3 jdbc api
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
 
Dao example
Dao exampleDao example
Dao example
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
 
Internal
InternalInternal
Internal
 
3. elements
3. elements3. elements
3. elements
 
2. attributes
2. attributes2. attributes
2. attributes
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to html
 
Headings
HeadingsHeadings
Headings
 
Forms
FormsForms
Forms
 
Css
CssCss
Css
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Starting jdbc
Starting jdbcStarting jdbc
Starting jdbc
 

9 cm604.26

  • 1. Packages and Classpath Objective : On completion of this period, you would be able to learn • Packages • Concept of classpath 1
  • 2. Recap Final class • Classes that can not be inherited 2
  • 3. Packages • What is a package? • We already know how to organize our files • We use directories for doing so • The advantage is • Easy maintenance of files • If we want to organize our java class files • System provides a facility • Packages 3
  • 4. Packages Contd.. • Package • Name provided to a group of classes • A collection of related classes and interfaces • A namespace management tool provided by Java 4
  • 5. Packages Contd.. • Directory structures that organize classes and interfaces • Mechanism for software reuse • Can be compared to directories or folders • Files : Directories :: Class files : Packages 5 5
  • 6. Naming Convention • Follows standard Java naming rules • Case sensitive • Generally written in small case • Every name must be unique • Packages in the Java language itself begin with java 6
  • 7. Naming Convention Contd.. • Prefix a domain name to the preferred package name • Avoids name conflict when used in Internet • for example, com.company.region.package • com.ibm.in.banking 7
  • 8. Packages Java packages are classified in to two types : • Java API packages ( system defined packages) • User defined packages 8
  • 9. Packages Contd.. •The packages are organized in a hierarchical structure as shown in the figure java. awt Package containing awt package COLOUR GRAPHICS Package containing AWT classes FONT … IMAGE AWT classes containg methods Hierarchical representation of java.awt package. The package named java contains the package awt , which in turn contains various Fig. 26.1 classes required for implementing graphical user interface 9
  • 10. System defined packages • Some examples • java.io • java.util • java.lang • java.awt • java.awt.event • java.sql • java.net • java.math • java.io 10
  • 11. Package Statement • Used to create a package • Should be the first statement in a Java source file • Syntax – package nameOfPackage; Keyword User-defined name • eg. : package cis; // cis – college information system • nameOfPackage is a sequence of names separated by . (dot) 11
  • 12. Package Statement Contd.. • Java supports the package hierarchy • Specified by multiple names in a package statement, separated by . (dot) – eg. : package firstPackage.secondPackage; • Advantage is – Group related classes into a package and then group the related packages into a larger package 12
  • 13. Packages Example : package firstPpackage ; // package declanation public class firstClass // class definition { ----------- ( body of class ) ----------- } • Here the package name is ‘firstPackage’ • The class ‘firstClass’ is now considered a part of this package • This listing would be saved as a file called firstClass.java • When the source file is compiled, java compiler will create a class file and store it in the ‘firstPackage’ directory 13
  • 14. Example Program // A simple package package coreBank; class Balance { package statement String name; double bal; Balance(String n, double b) { name = n; bal = b; } 14
  • 15. Example Program Contd.. void show() { if(bal<0) System.out.print("-->> "); System.out.println(name + ": $" + bal); } } 15
  • 16. Example Program Contd.. package coreBank; public class AccountBalance { public static void main(String args[]) { Balance current[] = new Balance[3]; current[0] = new Balance("K. J. Fielding", 123.23); current[1] = new Balance("Will Tell", 157.02); current[2] = new Balance("Tom Jackson", -12.33); for(int i=0; i<3; i++) current[i].show(); } } 16
  • 17. Compiling and Executing • On compilation • The package statement creates directory(folder) with the name of the package • That is, folder named ‘coreBank’ is created • While executing • Qualify the class name with its package name • That is, coreBank. AccountBalance 17
  • 18. Compiling and Executing Contd.. • Compiling • javac AccountBalance.java • Executing • java coreBank.AccountBalance Class name to be qualified with its package 18
  • 19. Default Package • System provides when you do not create one • It is the current working directory 19
  • 20. Advantages of Packages • Easily determine how classes and interfaces are related • Avoids namespace conflict • Implement application-wise access protection • Provides a mechanism for class reuse 20
  • 21. Classpath • Tells applications where to find third-party and user-defined classes • The search order used by java tools • Java platform (bootstrap) classes, any extension classes, and the class path • Two ways to change class path • -classpath option change the class path of java tools • CLASSPATH environment variable • The first approach is preferred 21
  • 22. Setting the Classpath • -classpath • jdkTool -classpath path1;path2... – eg. : javac –classpath d:projectclasses • CLASSPATH environment variable • eg. : SET CLASSPATH d:projectclasses 22
  • 23. Classpath and Archive files • Classes can be stored either in directories (folders) or in archive files ( jar files) • eg. The Java platform classes are stored in rt.jar. • Class path to the archive files • For a .jar or .zip file that contains .class files, the path ends with the name of the .zip or .jar file • eg. : javac –classpath d:projectutilClasses.zip • eg. : javac –classpath e:xmlxalan.jar 23
  • 24. Multiple Path Entries • Multiple path entries are separated by semi-colons • To find class files in the following directories • C:javaMyClasses • C:javaOtherClasses • set the classpath to: • C:> java –classpath C:javaMyClasses;C:javaOtherClasses • Order of classpath entries is important 24
  • 25. Summary • In this class we have discussed • Package • Naming convention • Creating a package • Concepts of classpath 25
  • 26. Frequently Asked Questions 1. What is a package ? 2. What are Java’s system defined packages ? 3. What are the advantages of packages ? 4. How to set classpath for your Java application ? 26
  • 27. Quiz 1.An package is a collection of 1. classes 2. Interfaces 3. editing tools 4. classes and interfaces 27
  • 28. Quiz Contd.. 2.Which keyword is used to define package 1. packages 2. package 3. packaging 4. directory 28
  • 29. Quiz Contd.. 3.A class path specifies 1. A list of paths for java source files 2. A list of paths for image files 3. A list of paths for the required classes and zip files 4. None CM604.26 29
  • 30. Quiz Contd.. 4.Which of the following statements is true ? 1. There can be any number of package statements in a java file 2. Package statement can be any where in the java file 3. There can be only one package statement in a java file 4. None CM604.26 30