World's most popular travel blog for travel bloggers.
1

What is Servlet ? Explain Servlet life cycle.

posted on , by Anonymous

 Servlet: A servlet is a Java programming language class that is used to extend the capabilities of servers that host applications accessed by means of a request-response programming model.Servlet life cycle: A servlet life cycle can be defined as the entire process from its creation till the destruction. The following are the paths followed by a servlet.The servlet is initialized by calling the init() method.The servlet calls service() method to process ...

0

What is Protocol Layers

posted on , by Anonymous

 The communication between the nodes in a packet data network must be precisely defined to ensure correct interpretation of the packets by the receiving intermediate and the end systems. The packets exchanged between nodes are defined by a protocol - or communications language.There are many functions which may be need to be performed by a protocol. These range from the specification of connectors, addresses of the communications nodes, identification of interfaces, options, flow ...

0

What are Microwaves ? Explain their properties.

posted on , by Anonymous

Microwave: Electromagnetic Spectrum consists of entire range of electromagnetic radiation. Radiation is the energy that travels and spreads out as it propagates. The types of electromagnetic radiation that makes the electromagnetic spectrum is depicted in the following screenshot.Properties of MicrowavesFollowing are the main properties of Microwaves.Microwaves are the waves that radiate electromagnetic energy with shorter wavelength.Microwaves are not reflected by Ionosphere.Microwaves travel ...

0

What is proxy server? Explain URL class and its methods in java.

posted on , by Anonymous

 StringStringBufferString is slow and consumes more memory when you concat too many strings because every time it creates new instance.StringBuffer is fast and consumes less memory when you concat strings.String class overrides the equals() method of Object class. So you can compare the contents of two strings by equals() method.StringBuffer class doesn’t override the equals() method of Object class.Q8. a) What is proxy server? Explain URL class and its methods in java.Answer : – A proxy ...

0

What is Servlet? Explain GET and POST methods of Servlet.

posted on , by Anonymous

Servlet can be described in many ways, depending on the context.Servlet is a technology which is used to create a web application.Servlet is an API that provides many interfaces and classes including documentation.Servlet is an interface that must be implemented for creating any Servlet.Servlet is a class that extends the capabilities of the servers and responds to the incoming requests. It can respond to any requests.Servlet is a web component that is deployed on the server to create a dynamic ...

0

Explain TCP/IP Sockets.

posted on , by Anonymous

 A socket programming interface provides the routines required for interprocess communication between applications, either on the local system or spread in a distributed, TCP/IP based network environment. Once a peer-to-peer connection is established, a socket descriptor is used to uniquely identify the connection. The socket descriptor itself is a task specific numerical value.Normally, a server runs on a specific computer and has a socket that is bound to a specific port number. The server ...

0

Explain the need of JDBC? Explain steps involved in connecting a databases using JDBC.

posted on , by Anonymous

 Steps: ·      Register the driver class The forName() method of Class class is used to register the driver class. This method is used to dynamically load the driver class.     Class.forName("oracle.jdbc.driver.OracleDriver");   ·       Create the connection object The getConnection() method of DriverManager class is used to establish connection with the database. Connection con=DriverManager.getConnection( "jdbc:oracle:thin:@localhost:1521:xe","system","password");   ·      Create ...

0

Explain the need of package in Java. Write a java program to show how package is created

posted on , by Anonymous

 A Java package is a set of classes which are grouped together. This grouping helps to organize Java classes and interfaces classes with the same name.A package provides a unique namespace for the types it contains.Classes in the same package can access each other’s package-access members.Creating packagepackage world;public class HelloWorld {  public static void main(String[] args) {    System.out.println(“Hello World”);  }}Calling packageimport world.*; import ...

0

(b) Explain followings in context of java, with the help of examples.(i) Class and objects (ii) Abstraction and encapsulation (iii) Application program and applet program

posted on , by Anonymous

 Class and objectA class is a blueprint that describes characteristics and functions of entity.. For example, the class Dog would consist of traits shared by all dogs. A class is collection of the properties and methods are called members. Object is an instance of class.Data abstraction: – it is a process that provides only essential features by hiding its background details. A data abstraction is a simple view of an object that includes required features and hides ...

0

Explain the need of package in Java. Explain accessibility rules for packages.

posted on , by Anonymous

 Package in Java is a mechanism to encapsulate a group of classes, sub packages and interfaces.Advantages of using a Package in JavaReusability - While developing a project in java, we often feel that there are few things that we are writing again and again in our code. Using packages, you can create such things in form of classes inside a package and whenever you need to perform that same task, just import that package and use the class.Better Organization - Again, in large java ...

0

Explain use of static methods in java.

posted on , by Anonymous

 A static method belongs to the class rather than the object of a class.A static method can be accessed directly by the class name and doesn’t need any object.A static method can access static data member and can change the value of it.A static method cannot refer to "this" or "super" keywords in anyway.In core Java program, execution starts from main method when you type java main-class-name, JVM search for public static void main(String args[ ]) method in that class and if it doesn't find ...

0

What is layout manager? Describe use of flow layout and grid layout with the help of program code.

posted on , by Anonymous

 Layout Manager: The Layout managers enable us to control the way in which visual components are arranged in the GUI forms by determining the size and position of components within the containers.Java – Flow LayoutFlow layout is the default layout, which means if you don’t set any layout in your code then layout would be set to Flow by default. Flow layout puts components (such as text fields, buttons, labels etc) in a row, if horizontal space is not enough to hold all components then ...

0

What is exception? What are different types of exceptions? Explain need of exceptions
handling with the help of a program.

posted on , by Anonymous

 Exception: When an error occurs within a method, the method creates an object and hands it off to the runtime system. The object, called an exception object, contains information about the error, including its type and the state of the program when the error occurred. Creating an exception object and handing it to the runtime system is called throwing an exception.Types of Exception in Java with ExamplesBuilt-in exceptions are the exceptions which are available in Java libraries. ...

0

What is polymorphism? Explain use of polymorphism in java programming

posted on , by Anonymous

 Polymorphism: Polymorphism is considered one of the important features of Object-Oriented Programming. Polymorphism allows us to perform a single action in different ways. In other words, polymorphism allows you to define one interface and have multiple implementations. The word “poly” means many and “morphs” means forms, So it means many forms.A person at the same time can have different characteristic. Like a man at the same time is a father, a husband, an employee. So the same person posses ...

0

Explain use(s) of following keywords of Java with the help of program/example: final

posted on , by Anonymous

 Java final keywordIn Java, the final keyword is used to denote constants. It can be used with variables, methods, and classes.Once any entity (variable, method or class) is declared final, it can be assigned only once. That is,the final variable cannot be reinitialized with another valuethe final method cannot be overriddenthe final class cannot be extended1. Java final VariableIn Java, we cannot change the value of a final variable. For example,class Main { public static ...

0

Describe features of Java programming language

posted on , by Anonymous

 The prime reason behind creation of Java was to bring portability and security feature into a computer language. Beside these two major features, there were many other features that played an important role in moulding out the final form of this outstanding language. Those features are :1) SimpleJava is easy to learn and its syntax is quite simple, clean and easy to understand.The ...