This blog is about providing theory as well as simple executable codes of different programming languages such as java, C, C++, and web programming, etc. This blog will be helpful to the IT students to learn about programming.

Thursday, March 9, 2023

Write short notes on 1. polymorphism 2. applet vs Application 3. Marshalling and unmarshalling

 1. Polymorphism:

Polymorphism is a concept in object-oriented programming (OOP) that refers to the ability of an object to take on multiple forms. In Java, polymorphism can be achieved through method overloading and method overriding. Method overloading means that multiple methods can have the same name but different parameters. Method overriding means that a subclass can provide a different implementation of a method that is already defined in its superclass. Polymorphism allows for more flexible and modular code design, as objects can be treated as their superclass type, allowing for easier code reuse and maintenance.


2. Applet vs Application:

An applet is a small program that runs within a web browser. It is written in Java and can be embedded into a web page using HTML. Applets are designed to be run on any computer with a Java Virtual Machine (JVM) installed, making them platform-independent. In contrast, an application is a standalone program that runs on a computer's operating system. Applications are typically written in Java and compiled into a .jar file that can be executed on any computer with a JVM installed. While applets can be useful for adding interactivity to web pages, they have limitations in terms of security and performance, and are less commonly used today than they were in the past.


3. Marshalling and Unmarshalling:

Marshalling and unmarshalling are techniques used in distributed computing to convert data between different formats. Marshalling refers to the process of converting data from a native format to a format that can be transmitted over a network, such as XML or JSON. This involves serializing the data into a format that can be easily transmitted, typically through binary encoding. Unmarshalling, on the other hand, refers to the process of converting the transmitted data back into its original format. This involves deserializing the data, decoding it back into its original form. Marshalling and unmarshalling are important techniques in distributed computing, as they allow different programs and systems to communicate with each other, regardless of their underlying data formats.

No comments:

Post a Comment

If you have any doubts, please let me know

Slider Widget