Posts

Showing posts from August, 2022

inheritance and interface concepts of java

Image
       Inheritance      Definition – what is inheritance      Types – Single inheritance                       Multilevel inheritance                    Multiple inheritance ( thru interface )                    Hybrid inheritance What is inheritance      • Inheritance is acquiring properties of a class by another class      • Here, properties means that data and methods which are belongs to  that base class      • Properties owning class is called as base class or parent class or super  class      • Properties acquiring class is called as Derived class or child class or  sub class    Single inheritance               • One child class to a ...
Image
 Java IO Stream Java performs I/O through Streams. A Stream is a continuous flow of data. Streams are clean way to deal with input/output. Java encapsulates Stream under java.io package. Java defines two types of streams. They are, 1. Byte Stream : It provides a convenient means for handling input and output of byte. 2. Character Stream : It provides a convenient means for handling input and output of characters. Character stream uses Unicode and therefore can be internationalized. Java Byte Stream Classes      Byte stream is defined by using two abstract class at the top of hierarchy, they are  InputStream and OutputStream. These two abstract classes have several concrete classes that handle various devices such as disk files, network connection etc. Some important Byte stream classes  Stream class Description BufferedInputStream Used for Buffered Input Stream. BufferedOutputStream Used f...

java package

Image
Packages                Packages are nothing but Putting classes and interfaces together in a bundle or envelope. • Package is the collection of several classes , interfaces and sub  packages • There are two types of packages in java • Built in/In Built packages - java, java.awt, java.io • User defined packages - MyPackage {perfume, dresses} Keywords • Import - import keyword is used to bring a package to the current class • Package – package keyword is used to define a package                    Example import java.io.*; package MyPack; public class Perfume{} public class Dress{} # classes Perfume and Dress belongs to the package MyPack Advantages Java Package is used to categorize classes and interfaces to maintain easily java Package Provides access Protection java Package removes naming collision
Image
 Exception handling   • Exception Handling is the powerful mechanism of java • Exception is an abnormal condition occurs during run time • Exception is an event which disrupt the normal flow of a program • Some of the exceptions are :       ClassNotFoundException       SQLException       IOException       RemoteException Keywords of Exception Handling Try – “try” keyword is used to specify a block where do we expect      exception. Try block is followed by catch block. • Catch - catch block is used to specify Solution of the exception raised. It is followed by finally block. • Finally – finally block is used to execute important code of the program. It will execute even an exception occurs or not. • Throw – throw keyword is used to throw an exception • Throws – throws keyword used to declare exception and doesn’t throw an exception. Example public class ExceptionE...
Image
  Internet Technologies      Devices     Software     Hardware Protocols     Devices   Computer – Desktop Computer Mobile Devices – Laptop / Cell Phones  Any Electronic Device connected on Network      Software   Software is the logical entity of the  internet technologies A browser is an application program that provides a way to look at and interact with all the information on the World Wide Web . This includes Web pages, videos and images.         Hardware Server Client Router Switches Gateway       Protocols Protocols are set of rules used for data transmission. Some of the Protocols are as follows. TCP/IP HTTP SMTP FTP SSL POP   
Image
    INTRODUCTION TO INTERNET Definition....................................... Types............................................ Uses.............................................. Devices......................................... History........................................... Important Terms............................   Definition of Internet Internet is known as “Interconnection of Computer Networks” Computer Network is known as connection of group of Computers. Globally millions of Computers and Computer Networks connected together to communicate through sharing data and media         Types of Network LAN Local Area Network – Computer Network setup within a Campus. eg. Computer lab of colleges  MAN Metropolitan Area Network – Network setup between difference Campuses situated within a metropolitan area . Eg – Bank transaction WAN Wide Area Network – Interconnection of different types of networks globally. Eg - internet      ...