Browsing Category
Java
Description of Java is a general-purpose programming language that is class-based, object-oriented, and designed to have as few implementation dependencies as possible. Java is a general-purpose programming language that is class-based, object-
Java List Interface: The Complete Guide
The list interface is used to store and manipulate items. Insertion and deletion are positional based, and the List can have duplicate items in it. In addition, it is used to store lists of objects and preserve order. List Interface is…
Java String split: How to Split String in Java
While programming, we may need to break the String based on some attributes. Mostly this attribute will be a separator or a common - with which you want to break or split the String.
Java String split()
Java String split() is a built-in…
Java Comparable Interface: The Complete Guide
In the programming world, ordering is significant the elements we use for programming must be comparable to each other. For example, strings and numbers are easy to compare with each other but the same cannot be said for the object.
Java…
Java Comparator Interface: The Complete Guide
Java Comparator interface is used to sort an array or list of objects based on a custom order. Custom ordering of elements is imposed by implementing Comparator.compare() method in the objects.
Java Comparator Interface
The comparator…
Exception Handling in Java: The Complete Guide
In Java, the program coded by the programmer can be used in a very unexpected way by the user; due to this, the program may fail in different ways during execution.
The main objective should be to write a code that does not fail…
Transient Keyword In Java: The Complete Guide
In Java, we have a keyword 'transient' used to ignore the mentioned variables from getting serialized. This means that when we write our data in a file, there may be some data that we do not want to be written in the file. So, while writing…
Java String toUpperCase: The Complete Guide
The toUpperCase() method has two variants. The first variant converts all of the characters in this String to the upper case using the given Locale rules. This is equivalent to calling toUpperCase(Locale.getDefault()).
Java String…
Java Set: The Complete Guide
Set has various methods to add, remove clear, size, etc., to enhance the usage of an interface. Set also adds the stronger contract on a behavior of the equals and hashCode operations, allowing the Set instances to be compared meaningfully…
Java String startsWith(): Complete Guide
Java String startsWith() method is used to check the prefix of String. It verifies if the given String starts with an argument string or not. Java String startsWith() method is an overloaded method and has two forms:
public boolean…
Java String substring: The Complete Guide
A substring of a string is defined as a sequence of characters in the string starting at some index and going continuously (without skipping any index or changing the order of characters) up to some higher index. The right index of the…
Java Data Types: The Complete Guide
Java is a statically typed language, we always need to define a keyword, which type of the variable is, and that keyword is called DataType. We declare data type before a variable. For example, int x; here int is an integer data type. Data…