Java2Blog
  • Home
  • Core Java
  • Tutorials
    • Spring
    • Spring Boot
    • Spring MVC
    • Java 8
    • Hibernate
  • Categories
    • Interview Questions
    • Spring Frameworks
    • Core java
    • Python
    • C++
  • NM
close
import_contacts

Java Tutorials

  • Core Java
  • Java Interview questions
  • Java 8 Stream
  • Java interview programs
import_contacts

Data structure and algorithm

  • Data structure in java
  • Data structure interview questions
import_contacts

Spring tutorials

  • Spring tutorial
  • Spring boot tutorial
  • Spring MVC tutorial
  • Spring interview questions

java programs

  • Core Java interview java programs String
    02 August

    How to find length of string in java without using length() method

    One of the interview question is “How to find length of string in java without using length() method.” There are many ways to find length of String.  Some of them are : Using toCharArray is simplest solution. Using toCharArray Logic Convert string to char array using toCharArray method Iterate over char array and incrementing length […]

    Read More
  • Basic java programs Core Java interview Number
    01 August

    Java program to check Armstrong number

    Armstrong number is a 3 digit number which is equal to sum of cube of its digits. For example: 371,153 In this post,  we will see how to check for Armstrong number in java. [crayon-6838fdbe57ae6487080818/] When you run above program, you will get following output. [crayon-6838fdbe57aea341936833/] Please go through Frequently asked java interview Programs for more such […]

    Read More
  • Algorithm Interview Basic java programs String
    01 August

    Java program to reverse a String

    In this post,  we will see java program to reverse a String. There are many ways to do reverse a String in java, some of them are: Using for loop Declare empty String reverse. This will contain our final reversed string. Iterate over array using for loop from last index to 0th index Add character […]

    Read More
  • Basic java programs Number
    01 August

    How to swap two numbers without using temporary variables in java

    In this post, we will see how to swap two numbers without using temporary variables. There are three ways to do it. Java program: [crayon-6838fdbe57d1c161780879/] When you run above program, you will get following output: [crayon-6838fdbe57d1f347753664/] Third way is fastest of all. Please go through Interview programs in java  for more such programs.

    Read More
  • Basic java programs Number
    10 July

    How to find prime factors of a number in java

    In this post, we will see how to find prime factors of a number in java. A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. The prime factors of a number are all of the prime numbers that will exactly divide the given number. […]

    Read More
  • Basic java programs Core Java interview Number
    09 July

    java program to check prime number

    This is easy question. It may not be asked you directly, but you can use this program to create many other complex program. A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. Program logic: If any number which is not divisible by any other […]

    Read More
  • Basic java programs Core Java interview
    09 July

    Palindrome program in java

    In this article, we will see how to implement palindrome program in java. A palindrome is a word, phrase, number, or other sequence of symbols or elements that reads the same forward or reversed. For example: 12121 is palindrome as it reads same forward or reversed. madam is also a palindrome . This is very […]

    Read More
  • keyboard_arrow_left Previous
  • 1
  • …
  • 6
  • 7
  • 8

Newsletter


Let’s be Friends

  • Facebook
  • Twitter
  • LinkedIn

© 2020-22 Java2Blog Privacy Policy