There are plenty of tools included in the JDK which help programmers with writing, debugging, or maintaining applications. Micro Edition – development platform for embedded and mobile applications.Enterprise Edition – an extension to the Standard Edition with support for distributed computing or web services.Standard Edition – development kit for creating portable desktop or server applications.There are three types of JDK environments: JDK stands for Java Development Kit, which is a set of tools necessary for developers to write applications in Java. When we use this keyword, we make Java use a monitor lock to provide synchronization on a given code fragment. More information about synchronized can be found in this article. We can use it with the instance as well as with static methods and code blocks. The synchronized keyword may be the most advanced. When methods are abstract, they are left without implementation and can be overridden in subclasses. Instead, they are meant to be subclassed. When classes are abstract, they can't be instantiated. This one can describe classes and methods. The final keyword is explained in more detail in this article. When final is applied to a class or a method, it assures us that that class or method cannot be extended or overridden. So it can't be reassigned to another object. When final is used on a field, it means that the field reference cannot be changed. We can use it with fields, methods, and classes. This article goes into more detail about the static keyword. They are called with the class name instead of the object reference name. Class members don't need an instance to be invoked. Static fields or methods are class members, whereas non-static ones are object members. There are five other modifiers available in Java:įirst of all, we can apply the static keyword to fields and methods. What's more, the protected modifier allows subclasses to access the protected members of a superclass, even if they are not within the same package. We can't apply this access modifier to classes, only to class members. Similar to the default modifier, all classes within one package can access protected members. If we use default visibility our class or its members will be accessible only inside the package of our class. We should keep in mind that the default access modifier has nothing in common with the default keyword. We can apply default visibility by not adding any access modifier at all. Unlike the private modifier, we can apply the default modifier to all types of class members and to the class itself. It can be applied to methods, properties, constructors, nested classes, but not to top-level classes themselves. The private modifier assures that class members won't be accessible outside the class. What Is the Purpose of the Serializable Interface? What Is the Difference Between Static and Dynamic Class Loading? What Is the Difference Between Dynamic Binding and Static Binding? Core Java Questions for Advanced Programmers.What Are Two Types of Casting in Java? Which Exception May Be Thrown While Casting? How Can We Avoid It? Q9.What Are the Methods of the Object Class and What Do They Do?.What Is the void Type and When Do We Use It? What Is the Difference Between the Comparable and Comparator Interfaces? What Is the Difference Between Stack and Heap? What Is the Difference Between JDK, JRE, and JVM? Which Other Modifiers Are Available in Java and What Is Their Purpose? Which Access Modifiers Are Available in Java and What Is Their Purpose? What Is the Difference Between Import and Static Imports? Is Data Passed by Reference or by Value in Java?
0 Comments
Leave a Reply. |