BeginnersBook

  • Home
  • Java
    • Java OOPs
    • Java Collections
    • Java Examples
  • C
    • C Examples
  • C++
    • C++ Examples
  • DBMS
  • Computer Network
  • Python
    • Python Examples
  • More…
    • jQuery
    • Kotlin
    • WordPress
    • SEO
    • JSON
    • JSP
    • JSTL
    • Servlet
    • MongoDB
    • XML
    • Perl

Java program to convert decimal to binary

Last Updated: September 10, 2022 by Chaitanya Singh | Filed Under: Java Examples

There are three following ways to convert Decimal number to binary number: 1) Using toBinaryString() method of Integer class. 2) Do conversion by writing your… [Read More]

Tags: Java-Conversion

Java program to get IP address

Last Updated: September 10, 2022 by Chaitanya Singh | Filed Under: Java Examples

In this example we are gonna see how to get IP address of a System. The steps are as follows: 1) Get the local host… [Read More]

Java Program to get input from user

Last Updated: September 10, 2022 by Chaitanya Singh | Filed Under: Java Examples

In this tutorial we are gonna see how to accept input from user. We are using Scanner class to get the input. In the below… [Read More]

Java Program to find duplicate Characters in a String

Last Updated: September 10, 2022 by Chaitanya Singh | Filed Under: Java Examples

This program would find out the duplicate characters in a String and would display the count of them. import java.util.HashMap; import java.util.Map; import java.util.Set; public… [Read More]

How To Convert Char To String and a String to char in Java

Last Updated: September 10, 2022 by Chaitanya Singh | Filed Under: Java Examples

In this tutorial, we will see programs for char to String and String to char conversion. Program to convert char to String We have following… [Read More]

Tags: Java-Conversion

How to convert a char array to a string in Java?

Last Updated: September 10, 2022 by Chaitanya Singh | Filed Under: Java Examples

There are two ways to convert a char array (char[]) to String in Java: 1) Creating String object by passing array name to the constructor… [Read More]

Tags: Java-Conversion

Java program to generate random number – Example

Last Updated: September 10, 2022 by Chaitanya Singh | Filed Under: Java Examples

Example Program to generate random numbers In the below program, we are using the nextInt() method of Random class to serve our purpose. /* Program:… [Read More]

Java program to perform binary search – Example

Last Updated: September 10, 2022 by Chaitanya Singh | Filed Under: Java Examples

Example Program to perform binary search on a list of integer numbers This program uses binary search algorithm to search an element in given list… [Read More]

Java program for linear search – Example

Last Updated: September 10, 2022 by Chaitanya Singh | Filed Under: Java Examples

Example Program: This program uses linear search algorithm to find out a number among all other numbers entered by user. /* Program: Linear Search Example… [Read More]

Java program to print Floyd’s triangle – Example

Last Updated: September 10, 2022 by Chaitanya Singh | Filed Under: Java Examples

Example Program: This program will prompt user for number of rows and based on the input, it would print the Floyd’s triangle having the same… [Read More]

  • « Previous Page
  • 1
  • …
  • 9
  • 10
  • 11
  • 12
  • 13
  • Next Page »

Java Examples

  • Check Odd-even
  • Linear Search
  • Binary Search
  • Floyd's Triangle
  • Reverse number
  • Random Number
  • first n prime numbers
  • Disp prime Numbers
  • Check Prime number
  • Palindrome String
  • Find factorial
  • Sum of elements of Array
  • Area of rectangle
  • Area of Square
  • Area of Triangle
  • Circle

Tutorials

  • Java Tutorial
  • OOPs Concepts
  • Java String
  • Exception handling
  • Java Multithreading
  • Java I/O
  • Java Serialization
  • Java Regex
  • Java AWT
  • Java Swing
  • Java Enum
  • Java Annotations

Copyright © 2012 – 2026 BeginnersBook . Privacy Policy . Sitemap