Subscribe to Get Free Material Updates!
Visit my new blog WebData Scraping - Web Scraping Service provider company in India.
Google’s Doodle on ‘Electronic waves’!
Today the web giant Google has published very interesting doodle logo on Electronic Waves on the occasion German physicist Heinrich Rudolf Hertz on his 155th birth anniversary. He was born at Hamburg on Feb 22, 185. He was the first person who broadcast and receives radio waves. Then after the invention of television, phones and many other electronic devices become possible due to electronic waves.
The unit of frequency of radio wave is hertz , in memory of of Heinrich Hertz. The Google doodle for Electronic wave has three color yellow, blue, green, and red.
You May Also Like:
Posted in: GoogleStory of Linux Operating System
Linux is an Open Source Operating system which is most popular in the world because of its features such as freeware, secure (free from viruses so no need of Antivirus software) and open source means OS source code is open for everyone and any one can see the code and modify it as per his/her requirements. Linux OS is widely used on web servers because of security feature. The below video ‘Story of Linux’ of 3:38 sec duration contains great animation which demonstrates who has developed linux? and how it come in picture? And why Linux become so popular? Must watch this video to see the great history of Linux OS.
Posted in: LinuxPowerpoint Presentation on Cloud Computing
The presentation is on Cloud Computing which briefly describes following topics from which you get over all basic ideas about 'What is Cloud Computing?'
- What is Cloud Computing?
- Evolution of Cloud Computing.
- Architecture of Cloud Computing.
- Types of Cloud Computing.
- Services offered by Cloud.
- Advantages of Cloud Computing.
- Disadvantages of Cloud Computing.
- References.
Download Cloud Computing Presentation
Posted in: PresentationsDifference Between Adapter class and Listeners Interface
When we implement a listener interface in any class then we must have to implement all the methods declared in that interface because all the methods in an interface are final and must be override in class which implement it. For example consider the following program which demonstrates handling of mouse events by implementing listener interface.
MouseEvents.java
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
/*<applet code="MouseEvents" height="300" width="300">
</applet>*/
Public class MouseEvents extends Applet implements MouseListener
{
Public void init()
{
addMouseListener(this);
}
Public void mouseClicked(MouseEvent me)
{
setBackground(Color.blue);
repaint();
}
Public void mouseEntered(MouseEvent me)
{
setBackground(Color.green);
repaint();
}
Public void mouseExited(MouseEvent me)
{
setBackground(Color.red);
repaint();
}
Public void mousePressed(MouseEvent me)
{
setBackground(Color.white);
repaint();
}
Public void mouseReleased(MouseEvent me)
{
setBackground(Color.yellow);
repaint();
}
}
Our above example for handling mouse events implements MouseListener interface so the class MouseEvent has to implement all the five methods listed below.- public void mouseClicked(MouseEvent me)
- public void mouseEntered(MouseEvent me)
- public void mouseExited(MouseEvent me)
- public void mousePressed(MouseEvent me)
- public void mouseReleased(MouseEvent me)
This can be inconvenient because if we want to use only one or two methods in your program then? It is not suitable solution to implement all the methods every time even we don’t need them. Adapter class makes it easy to deal with this situation. An adapter class provides empty implementations of all methods defined by that interface.
Adapter classs are very useful if you want to override only some of the methods defined by that interface. Here the names of Listener interface and corresponding interface are given which are in java.awt.event package.
Now consider a situation in which we want to perform any action only when mouse clicked and mouse releases then we should have to override mouseClicked() and mouseReleased() method. In this case if we use the listener interface then we must have to implements all the above five methods, the adapter class MouseAdapter will minimize programmer’s work. Following example demonstrate the use of Adapter class in place of Listener interface.
MouseEvents.java
implementing MouseListener.
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
/*<applet code="MouseEvents" height="300" width="300">
</applet>*/
Public class MouseEvents extends Applet extens MouseAdapter
{
Public void init()
{
addMouseListener(this);
}
/*no need to implement all the methods because default implementation given in adapter class*/
Public void mouseClicked(MouseEvent me)
{
setBackground(Color.blue);
repaint();
}
Public void mouseReleased(MouseEvent me)
{
setBackground(Color.yellow);
repaint();
}
}
Posted in: Java


