CREATING PACKAGES

No comments


                    Creating  our  own  package  involved  the  following  stapes  -

1.    Declare  the  package  at  the  beginning  of  a  file  using  form-Package  package  name;

2.   Define  the  class  that  is  to  be  put  in  the  package  and  declare  it  public.

3.  Create  a  sub  directory  under  directory  where  the  main  source  files  are  stores.

4.    Store  the  listing  as  the  class  name  .java  file  in  the  sub  directory  created.

5.    Compile  the  file.  This  creates  class  file  in  the  sub  directory.

No comments :

Post a Comment

Subscribe

Milan Panda
Admin
About Me | Contact
Copyright 2023-2024 © Programming1011 . 🎀 Developed and Design By- Milan Panda. Happy Holi All Of You 🎀