Welcome To The World Of Java

This site will teach you the basics of Java. It is not necessary to have any prior programming experience.

Print Sum of Series 1/1^2 + 1/2^2 + 1/3^2 …………1/n^2 in Java.

12:21:00 PM | Comments (0)

import java.util.Scanner; public class Series  {  public static void main(String[] args)   {   Scanner sc = new Scanner(System.in);   System.out.println("Enter the no of terms...

Read more

Print Sum of series 1+ (1+2) + (1+2+3)……. (1+2+3+…….n) in Java

12:06:00 PM | Comments (5)

import java.util.Scanner; public class Series   {  public static void main(String[] args)   {   Scanner sc = new Scanner(System.in);   System.out.println("Enter the no of...

Read more

Print sum of series 1/1^3 – 1/2^3 + 1/3^3…….1/n^3 in Java.

11:47:00 AM | Comments (0)

import java.util.Scanner; public class  Series  {  public static void main(String[] args)   {   Scanner sc = new Scanner(System.in);   double sum = 0;...

Read more

Print Series 1, 11, 111, 1111……..n terms in Java.

11:45:00 AM | Comments (17)

import java.util.Scanner; public class Series   {  public static void main(String args[])  {   Scanner sc = new Scanner(System.in);   System.out.print("Enter the number of terms:...

Read more

Print Series 1, 12, 123, 1234, …………n in Java.

11:36:00 AM | Comments (11)

import java.util.Scanner; public class Series  {  public static void main(String args[])   {   Scanner sc = new Scanner(System.in);   System.out.print("Enter the number of terms:...

Read more

Print Series 1, -3, 5, -7, …………n terms in Java.

11:26:00 AM | Comments (1)

import java.util.Scanner;public class OddSeries { public static void main(String args[])   {  Scanner sc = new Scanner(System.in);  System.out.print("Enter the number of terms: ");  int n...

Read more

Print Series 2, -4, 6, -8,………n terms in Java

6:28:00 AM | Comments (0)

import java.util.Scanner;public class Series { public static void main(String args[]) {  Scanner sc = new Scanner(System.in);  int c, i = 2, n;    ...

Read more

Java program to print Tribonacci Series.

6:18:00 AM | Comments (4)

A tribonacci series is one in which the sum next term is the sum of previous three terms Example 0 1 2...

Read more

Java program to print fibonacci series.

5:53:00 AM | Comments (0)

A fibonacci series is one in which the next term is the sum of previous two terms Example. 0 1 1 2 3...

Read more

Java program to find the frequency of one string in another string.

10:55:00 AM | Comments (0)

import java.util.Scanner; public class WordFrequencyCounter {     public static void main(String args[]) {         Scanner scan = new Scanner(System.in);...

Read more

Java program to remove vowels from a string.

10:25:00 AM | Comments (0)

import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader; public class RemoveVowels{ public static void main(String args[]) throws IOException {   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));   String str1,...

Read more

Java program to remove common characters from two strings.

8:57:00 AM | Comments (0)

import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class RemoveCommonDuplicateChar { public static void main(String args[]) throws IOException {  BufferedReader br = new BufferedReader(new InputStreamReader(System.in));  String s1, s2,...

Read more

Java program to reverse a String without using direct method.

10:15:00 PM | Comments (0)

import java.io.BufferedReader; public class ReverseOfString {  public static String reverseString(String s)  {   int l = s.length();   String backward = "";  ...

Read more

Java program to finding Shortest and Longest Words in a String.

12:19:00 PM | Comments (1)

import java.io.BufferedReader;class FindMinMaxString { public static void main(String args[]) {  findMethod("My name is Umesh Kushwaha"); } static public void findMethod(String s) {  String str =...

Read more

Java program to input name, middle name and surname of a person and print only the initials.

11:59:00 AM | Comments (2)

Example.Enter your nameUmesh Kumar KushwahaInitials are   U.K.K.import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;class InitialName { public static void main(String args[]) throws IOException {  BufferedReader br...

Read more

Java program to accept a string and print each character of the string along with its ASCII code.

11:22:00 AM | Comments (0)

class CalculateAscii { public static void main(String args[]) {  word("Umesh Kushwaha"); } static void word(String s) {  int len = s.length();  int a;  char a1; ...

Read more

Java program to count the occurrence of any character in given String.

11:13:00 AM | Comments (1)

import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.logging.Level;import java.util.logging.Logger;class CountFrequencyOfWord { public static void main(String args[]) {  try {   input();  } catch (IOException ex) {   Logger.getLogger(CountFrequencyOfWord .class.getName()).log(Level.SEVERE,...

Read more

Java program to remove duplicates characters from given String.

11:00:00 AM | Comments (0)

class RemoveDuplicate { public static void main(String args[]) {  remove("123aa bbbcc  c2589  99oppq rtyyy"); } static void remove(String s) {  int l = s.length();  int...

Read more

Java program to check Palindrome Number.

10:48:00 AM | Comments (0)

/*This program shows how to check for in the given list of numberswhether each number is palindrome or not*/public class JavaPalindromeNumberExample { public...

Read more

Java program to calculate the Simple Interest and Input by the user.

10:26:00 AM | Comments (0)

import java.util.*; class SimpleInterest {  int p, t;  float si, r;  public si() {   r = 0;   p = 0;  }  public...

Read more

Page 1 of 6123456Next