Static Members Flow Class members In java application we are defining objects for communication.Every Object is represented as a model(class). Hence, java application is the combination of classes. And every class in java application is allowed to define following members. 1) static members 2) non-static members Static members flow using JVM architecture : Java class supports definition of 4 static members. 1) static main method 2) static block 3) static variable 4) static method Static main method Example class Demo { //empty..... } How to Compile & Execute a simple Java program? 1) Save the program in "d-drive" with name Demo.java 2) Open command prompt, navigate to the path where the java program is stored 3) Compilation: cmd/> javac Demo.java Demo.class file will be generated. 4) Execution: cmd/>java Demo Error : main method not found... main method : 1) It is static method, hence...
Why Collections & why is it called a Framework? First Question: Why Collections? Collections are used to overcome problems with variables, arrays, classes like size problem, type problem, non existence of predefined operations/methods, etc. To get a Overview of the above discussed problems, click on this link What is a Framework? Its a semi-finished re-usable application, providing some low level services, which can be customized according to our requirement. Second Question: Why is it called a Framework? Collection API is available in util package & its called a Framework for the reason that, java programmers were not restricted to just utilize the existing classes making them final but was allowed to expand on top of the exiting classes inheriting them. Collections framework gives a clear example of when to use Interface & abstract class Classification of Collection Framework: In Collection Framework all the classes are classified into 3 cat...
What is a Web Service? Applications which are accessed via HTTP APIs are often called Web Services. In other words, a web service is a function that can be accessed by other programs over the web (HTTP). How many different kinds of Web Services are there? Primarily, there are two types of Web Services, Simple Object Access Protocol (SOAP) and Representational State Transfer (REST). A SOAP Web Service, accepts a request in XML format and generates an output in XML format. A REST Web Service is more versatile and can accept XML as well as JSON as request and generates an output in XML as well as JSON, or even HTML. Microservices The microservice architectural style involves developing single applications that can work together as a suite of small services, each running in its individual process and communicating with lightweight mechanisms such as an HTTP resource API. These services require bare minimum centralized management, use different data storage technolo...
Comments
Post a Comment