Computer Science Notes

Computer Science

Scanner Class in Java

Scanner Class In Java Notes

A Scanner class breaks its input into tokens using a delimiter pattern, which by default matches white space. The resulting tokens may then be converted into values of different types using the various next methods.

Read More

Java Strings Methods

Java Strings Methods Notes

int indexOf(char/String) – returns the index of the first occurrence of the specified character /string in the current string object. If the character/String is not present, it returns -1

Read More

Wrapper Class in Java

Wrapper Class In Java Notes

In other words, a wrapper class wraps a value of primitive type in an object.

Read More

Constructors in Java

Constructors In Java Notes

Constructor is a member function with the same name as that of a class and is used to initialize the data members of the class with a legal initial value.

Read More

Tokens in Java

Tokens In Java Notes

Token – The smallest individual unit in a program is known as Token. There are five tokens in Java.

Read More

Characteristics of Java

Characteristics Of Java Notes

The Java Programs need to be written just once which can be run on different platforms without making changes in the Java program. Only the Java interpreter is changed depending upon the platform.

Read More

Java Classes and Objects (OOP)

Java Classes And Objects (OOP) Notes

A class represents a set of objects that share common characteristics and behavior. An object is an identifiable entity with some characteristics and behavior.

Read More

Inheritance in Java

Inheritance In Java Notes

The keyword “extends” signifies that the properties of super class are extended to the subclass. That means, subclass contains its own members as well of those of the super class.

Read More

Dynamic v/s Static Binding

Dynamic V/s Static Binding Notes

In Java, member variables have static binding because Java does not allow for polymorphic behavior with member variables. That means if both the Animal class and the Dog class have a member variable with the same name, it's the base class version that is used.

Read More

Java Interface

Java Interface Notes

An interface can be implemented by many classes and a class can implement multiple interfaces. All methods in an interface are automatically public and abstract.

Read More