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 …
Category Archives: Uncategorized
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 is meant by Java being platform independent.
ANSWER: Java is platform independent as it can be used on any system regardless of having different operating systems and file systems. The way it does this by using the Java virtual machine (“JVM”). Look at the flow chart below for how it does it.
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 …
Continue reading “What’s the difference between a class method and an instance method?”
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 …
Jake Castle
He doesn’t really understand computer science very well and needs a lot of help trying to understand what goes on with code. His struggles start with the basics. Due to his poor basics, he could never grasp the essentials of another language that depend on the fundamentals. That’s why I will be posting articles about …