Beginners java programming examples



Basic 

        Java program to display odd numbers between 1 -100
        Java program to sum of odd numbers between 1 -100
        Java program to total number of odd numbers between 1 -100
        Java program to find sum of first n numbers
        Java program to find the sum of the digits of a number

        Java program to calculate electricity bill

        Java program to check the given number is Armstrong or not
        Java program to print upto N Armstrong numbers

        Java program to print given number in words

        Java program to check the given number is Palindrome or not
        Java program to print palindrome number upto N numbers

        Java program to print N prime numbers and find sum and average
        
Triangle and logical pattern

        Java program to print patterns of numbers and stars
        Java program to print different diamond patterns using stars
        Java program to print pyramid triangle with star and numbers
        Java program to print Floyds triangle
        Java program to print numbers in triangle and pyramid vice
        Java program to print numbers in pyramid vice
        Java program to print numbers in sequence way
        Java program to print different patterns using stars
        Java program to print stars in different patterns
        Java program to print stars in different ways 
           
Array

        Java program to find largest number in an array
        Java program to find second largest number in an array
        Java program to find largest and smallest number in an array
        Java program to find largest and second largest number in an array       

        Java program to find second smallest number in an array

        Java program to find index of max value in array java

        Java program to find index of smallest element in array java



        Java program to remove duplicate element in an array
        Java program to print odd and even numbers from an array

        Java program to add two matrix
        Java program to check given matrix is null matrix
        Java program to check given matrix is diagonal matrix
        Java program for Linear Search
        Java program for Binary Search

Applying mathematics

        Java program to calculate HCF and LCM
        Java program to find volume of cube
        Java program to print the reverse of a given number
        Java program to convert integer to roman letters

String

        Java program to count number of words in given string
        Java program to count number of duplicate words in given string
Java program to remove duplicate words in given string
        Java program to count each words and total number of words in given string

        Java program to reverse the string and check whether it is palindrome or not
Java program to delete vowels in a given string
        Java program to capitalize the first letter of each word in  a given string
        Java program to split a comma-separated string
        Java program to convert ASCI value to String
        Java program to replace vowels with star


        Java program to print character position count in a given string
        Java program to print reversed string by word in given line
        Java program to print reverse each character by word in given line --- invalid
        Java program to print reverse each word by word in given line ----
        Java program to returning a string as reverse text

Program to count repeated character in string


          
File

Read content from a file char by char
Read content from a file line by line

Copy content from one file to another
Count number of lines in a line
Count number of words in a file
        Distinct words in a given file




Related Post

Comments

Manas
         Hi, How I run a Package in Java with two function. Means I first create a Package with factorial number. Then I also create the same package with Fibonacci series. Then import the package from the main class. Package is store in a folder. Then how I run and compile the same in Net-bean and as well as Command Line.

©candidjava.com