Interfaces in java

Java is all about interaction between objects. The manner in which different objects communicate with each other is defined in what is called an ‘interface.’ Moreover, interfaces are also an important aspect of the inheritance feature of java. As part of an interface, the methods that can be used by a derived or sub-class are … Read more

Inheritance in java

Java supports inheritance. In other words, it is possible to derive one class from another class in this programming language. For instance, if you need to create a new class, which is an extension of an existing class, then you can simply derive this new class from an existing class. This allows the new class … Read more

Comments in Java

Just as in the case of C++ and C, Java supports two types of comments namely, single line comments and multi-line comments. The syntax for these types of comments are as follows: Single line comment: //<comment> Multiple line comment: /*<comment>*/ All characters that exist in the comments region are simply ignored by the Java compiler. … Read more

Java Keywords

Keywords or reserved words in Java are shown in the table below. As a rule, these words cannot be used as names for variables or constants. assert abstract break boolean case byte char catch const class default continue double do enum else final extends float finally goto for implements if instanceof import int long interface … Read more

Java Arrays

Arrays are contiguous memory locations that store different variables of the same sort. On the other hand, an array itself is an article on the memory. An array is a container object that holds a fixed number of values of a single type. The length of an array is established when the array is created. After creation, its length is fixed.

Java Identifiers

All Java components require names. Names utilized for classes, variables and strategies are called identifiers. In Java, there are a few focuses to recall about identifiers. They are as per the following standard: All identifiers ought to start with a letter (beginning to end or a to z), underscore (_) or special character ($). After … Read more