Featured Posts

[Travel][feat1]

All About Class Image in AWT in Java

December 10, 2018

The abstract class Image is the superclass of all classes that represent graphical images. The structure of the class is given as below:

public abstract class java.awt.Image extends java.lang.Object{
//member element:
public final static Object UndefinedProperty;
//The UndefinedProperty Object should be returned whenever a property which was defined for a particular
//image is fetched.
//constructor
public Image()//default constructor
//Methods:
public abstract void flush();
public abstract Graphics getGraphics();
public abstract int getHeight(ImageObserver observer);
public abstract Object getProperty(String name,ImageObserver observer);
public abstract ImageProducer getSource();
public abstract int getWidth(ImageObserver observer);
}
 
All About Class Image in AWT in Java All About Class Image in AWT in Java Reviewed by Animesh Chatterjee on December 10, 2018 Rating: 5

All About Class NotSerializableException in Java

December 10, 2018

An application that throws NotSerializableException indicates that the target object , that it tried to serialize,could not be serialized.This can happen to classes which does not implement Serializable interface. A class may implement Serializable interface but may refer or contain a non serializable object,in this case when we try to serialize the class,we will get NotSerializableException.

A subclass of a serializable class can prevent itself from being serialized by throwing this (NotSerializableException) exception from its writeObject() or readObject() methods.

It is a child class of ObjectSreamException.
The structure of the NotSerializableException class given as :

public class java.io.NotSerializableException extends java.io.ObjectStreamException{
//constructors:
public NotSerializableException();//default constructor
public NotSerializableException(String className);
}
 
All About Class NotSerializableException in Java All About Class NotSerializableException in Java Reviewed by Animesh Chatterjee on December 10, 2018 Rating: 5

All About Class NoRouteToHostException in Java

December 10, 2018

An application can throw this -NoRouteToHostException exception to indicate a socket could not be connected with remote host, as the host could not be connected due to one of the following reasons:

  • Host could not be connected before establishing socket
  • Some intermediate link/links between local machine to host is/are down.
  • Host may be behind a firewall.
This excaption-NoRouteToHostException is a subclass of SocketException.
The structure of NoRouteToHostException is given as:

public class java.net.NoRouteToHostException extends java.io.SocketException{
//constrcutors:
public NoRouteToHostException();//default constrcutor
public NoRouteToHostException(String message);
}
 
All About Class NoRouteToHostException in Java All About Class NoRouteToHostException in Java Reviewed by Animesh Chatterjee on December 10, 2018 Rating: 5

All About NotActiveException in Java

December 10, 2018


an application can throw NotActiveException if it invokes a method either the method never invoked in right time or the method is invoked at a wrong context.
If an ObjectInputStream or ObjectOutputStream is not currently active,the operations on one of these could not be performed.
NotActiveException is a subclass of ObjectStreamException.
The structure of NotActiveException class is given as:

public class java.io.NotActiveException extends java.io.ObjectStreamException{
//constructors:
public NotActiveException();//default constructor
public NotActiveException(String message);
}
 
All About NotActiveException in Java All About NotActiveException in Java Reviewed by Animesh Chatterjee on December 10, 2018 Rating: 5

All About PopupMenuPeer in AWT in Java

December 09, 2018


The PopupMenuPeer Interface specifies the methods that all implementations of Abstract Window Toolkit must define while working with PopupMen
The hierarchy of calling this component is as follows:
[PopupMenuPeer(MenuPeer(MenuItemPeer(MenuComponentPeer)))]

The architecture of the interface PopupMenuPeer is given as :

public abstract interface java.awt.peer.PopupMenuPeer extends java.awt.peer.MenuPeer{
//methods:
public abstract void show(Event evt);

} 

 
All About PopupMenuPeer in AWT in Java All About PopupMenuPeer in AWT in Java Reviewed by Animesh Chatterjee on December 09, 2018 Rating: 5
Powered by Blogger.