USING SYSTEM PACKAGES

No comments

The  syntax  of  defining  a  package  is –

     import  package  name.classname;
                   or
     import   packagename.*;

This  shows  that  the  package  name  java  contents  the  package  awt  which  turn  contents  various  classes  require  for  implementing  graphical  user  interface.  There  are  two  ways  of  accessing  the  classes  stored  in  a  package.  The  first  approached  to  the  fully  qualified  class  name  of  the  class  that  we  want  to  use.  Here  we  want  to  refer  the  class  color  in  the  awt  package  then  we  do  as  follows---

                 Java.awt.colour

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 🎀