Posts

Showing posts from September, 2021

Difference between String and StringBuffer

Image
String   The String class represents character strings. All string literals in Java programs, such as "abc", are implemented as instances of this class. Strings are constant; their values cannot be changed after they are created. String buffers support mutable strings. Because String objects are immutable they can be shared. For example: String str = "abc"; is equivalent to: char data[] = {'a', 'b', 'c'}; String str = new String(data);   Here are some more examples of how strings can be used:      System.out.println("abc");      String cde = "cde";      System.out.println("abc" + cde);      String c = "abc".substring(2,3);      String d = cde.substring(1, 2); Example of String  public class StringEx1 {        public static void main(String[] args ) {                 String t1 = "Chennai" ; //-- SCP                             //String t1 = new String(" Chenn

What is Web Service in Java ? Explain the SOAP & RESTful services.

Image
    What is Web Service? Web services  are client and server applications that communicate over the World Wide Web’s (WWW) Hyper Text Transfer Protocol (HTTP). As described by the World Wide Web Consortium (W3C), web services provide a standard means of interoperating between software applications running on a variety of platforms and frameworks. Web services are characterized by their great interoperability and extensibility, as well as their machine-processable descriptions, thanks to the use of XML. Web services can be combined in a loosely coupled way to achieve complex operations. Programs providing simple services can interact with each other to deliver sophisticated added-value services A  Web Service  is can be defined by following ways: It is a client-server application or application component for communication. The method of communication between two devices over the network. It is a software system for the interoperable machine to machine communication. It is a collection o

SOAP Webservice in Java

   Web Service Components There are three major web service components. SOAP WSDL UDDI SOAP SOAP is an acronym for Simple Object Access Protocol. SOAP is a XML-based protocol for accessing web services. SOAP is a W3C recommendation for communication between applications. SOAP is XML based, so it is platform independent and language independent. In other words, it can be used with Java, .Net or PHP language on any platform. WSDL WSDL is an acronym for Web Services Description Language. WSDL is a xml document containing information about web services such as method name, method parameter and how to access it. WSDL is a part of UDDI. It acts as a interface between web service applications. WSDL is pronounced as  wiz-dull . UDDI UDDI is an acronym for Universal Description, Discovery and Integration. UDDI is a XML based framework for describing, discovering and integrating web services. UDDI is a directory of web service interfaces described by WSDL, containing information about web servic

Fresher Java Interview Questions

Image
Q #1) What is JAVA? Answer:  Java is a high-level programming language and is platform-independent. Java is a collection of objects. It was developed by Sun Microsystems. There are a lot of applications, websites, and games that are developed using Java. Q #2) What are the features of JAVA? Answer: Features of Java are as follows: OOP concepts ·          Object-oriented ·          Inheritance ·          Encapsulation ·          Polymorphism ·          Abstraction Platform independent:  A single program works on different platforms without any modification. High Performance:  JIT (Just In Time compiler) enables high performance in Java. JIT converts the bytecode into machine language and then JVM starts the execution. Multi-threaded:  A flow of execution is known as a Thread. JVM creates a thread which is called the main thread. The user can create multiple threads by extending the thread class or by implementin

If you have any query or suggestions, Please feel free to write us

Name

Email *

Message *