Posts from Java

Print a string N number of times in Java

By Nishtha Grover

In this tutorial, we will see – How to Print a string N number of times in Java using various methods. A string is a sequence of characters. The String class in Java is used .... Read More

Check if binary representation of a number is palindrome in Java

By Adit Gupta

In this tutorial, I will be explaining if the binary of a number is palindrome or not in Java. A palindrome number is one which when reversed, yields the same number with which we .... Read More

Difference between Inheritance and Composition in Java

By Aakash Puri

In this tutorial, you are going to learn about the difference between Inheritance and Composition and also how to use it in Java Programming language. Although both of the features.... Read More

Java ObjectInputStream skipBytes() Method

By Caushik Subramaniam

Object Serialization in Java is supported by the classes, ObjectInputStream and ObjectOutputStream. The Java class ObjectInputStream has a method called skipBytes(len) and it allow.... Read More

Turning off a particular bit in a number in Java

By Adit Gupta

In this tutorial, we will learn to turn off a bit of a number. We can use bitwise operators to carry out turning off a bit. However, if you wish to skip these operators you can man.... Read More

Java program to Detect Cycle in an Undirected Graph

By Sumanth

In this tutorial, you will learn how to detect if a cycle exists in an undirected graph in Java without using any complex cycle-detection algorithms. Detection of a cycle in an und.... Read More

Unbounded fractional knapsack problem in Java

By Adit Gupta

In this tutorial, I will show how to solve the problem of unbounded fractional knapsack problem in Java language. It is somewhat different from the conventional knapsack problem. T.... Read More

Java Ternary operator with example

By Anisha Gupta

Java Ternary operator is a conditional operator and an only operator that accepts 3 operands. We can replace the if-else-then statement by one-liner using the ternary operator. var.... Read More

Related Posts