Programming

Programming

Share

10/11/2015

Programming Challenge
Can a static function/method access non-static member variables of class? Please state your reason.

Photos 02/11/2015

How Many of you know about Object Serialization/Deserialization

Serialization is usually used When the need arises to send your data over network or stored in files. By data I mean objects and not text.

Java provides a mechanism, called object serialization where an object can be represented as a sequence of bytes that includes the object's data as well as information about the object's type and the types of data stored in the object.

After a serialized object has been written into a file, it can be read from the file and deserialized that is, the type information and bytes that represent the object and its data can be used to recreate the object in memory.

Most impressive is that the entire process is JVM independent, meaning an object can be serialized on one platform and deserialized on an entirely different platform.

Classes ObjectInputStream and ObjectOutputStream are high-level streams that contain the methods for serializing and deserializing an object.

Cheers

26/10/2015

hi guys, today we will tell you a little about Interfaces.

An interface is a reference type in Java, it is similar to class, it is a collection of abstract methods. A class implements an interface, thereby inheriting the abstract methods of the interface.
An interface is similar to a class in the following ways:
• An interface can contain any number of methods.
• An interface is written in a file with a .java extension, with the name of the interface matching the name of the file.
• The byte code of an interface appears in a .class file.
• Interfaces appear in packages, and their corresponding bytecode file must be in a directory structure that matches the package name.

However, an interface is different from a class in several ways, including:
• You cannot instantiate an interface.
• An interface does not contain any constructors.
• All of the methods in an interface are abstract.
• An interface cannot contain instance fields. The only fields that can appear in an interface must be declared both static and final.
• An interface is not extended by a class; it is implemented by a class.
• An interface can extend multiple interfaces.

Want your school to be the top-listed School/college in Addis Ababa?
Click here to claim your Sponsored Listing.

Category

Telephone

Website

Address


Addis Ababa