Javadoc – Documentation made easy

Java standardized the documentation process so everyone follows the same convention when documenting their code. You can easily read the required documentation instead of scratching your head on other people’s documentation. Javadoc is created using a JDK javadoc tool. The tool converts the documentation to fresh, standard and easy HTML page.No hassle! Example Order of …

Multiple Default Methods in Inheritence

Back in the day, it was hard to add functionalities to inheritance without breaking the whole program., But now you can! How? You have to use default methods. Whenever there is a need for a new method in inheritance, it can be done without implementing the method in every single class implementing the interface. What …

Can a Semaphore act as a Mutex?

ANSWER: Let’s define both these terms. Semaphore: A semaphore control access to a shared resource using a counter. The counter measures the number of permits that are allowed. If a counter is zero, then access to the resource is denied. If it is greater than zero, then access to the resource allowed. Every time a …

What’s the difference between a class method and an instance method?

ANSWER: Class methods are declared as static hence they can be called without creating an instance of a class. Class methods can only operate on class members and not on instance variables since they are unaware of the instance members. In order to use an instance method, you must create a instance of a class …

Java: Access Modifiers

What is an Access modifier? Access modifiers are keywords used to specify the accessibility of a class (or type) and its members. These modifiers can be used from code inside or outside the current application.  Private Default Protected Public Private: Data members and methods that are declared private are used on within that specific class it …

Design a site like this with WordPress.com
Get started