Posts from Java

Find the first repeated character in a string in Java

By Siddharth Raja

In this tutorial, we are going to write a program to find the first repeated character in a string in Java. In this problem, we need to find the first character that is repeated an.... Read More

How we can insert a string into another string in Java

By Siddharth Raja

In this tutorial, we will see a program to insert a string into another string in Java. Consider the user enters two strings and an index value, we need to insert the second string.... Read More

Rounding off errors in Java

By Shradha Jadhav

In the given tutorial, we are going to learn how to round off errors in Java. In Java, most programs store the result of integer computations in 32 or 64 bits. Several calculations.... Read More

Iterator vs Foreach in Java

By Shradha Jadhav

In the given tutorial, Iterator verses for each loop is explained neatly. Iterator : Iterator belongs to java.util package, which is an interface and also a cursor. Cursors are .... Read More

WeakHashMap in Java

By Shradha Jadhav

In the given tutorial, we will see the WeakHashMap class from the java.util package and the usage in Java. WeakHashMap exclusively saves weak references into its keys. This the imp.... Read More

Introduction to Vectors in Java : Insertion and Deletion!

By Avantika Singh

Hello Learners, today we are going to learn about vectors in Java. Different operations on vectors like insertion, deletion, search operation, etc. The Vector is a class in java.ut.... Read More

Console reader() and writer() methods in Java with examples

By Shradha Jadhav

In the given tutorial, we are going to learn about reader() and writer() methods of Console class in Java. reader() :   Syntax : public Reader reader() The java.io.Console.rea.... Read More

Valid Variants of main() in Java

By Shradha Jadhav

In the given tutorial, we will learn about valid variants of main() method in Java. First, we should see the meaning of the main syntax : public : This is the access specifier. Bec.... Read More