Startertutorials Blog
Tutorials and articles related to programming, computer science, technology and others.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

Java program for demonstrating methods and method overloading

Suryateja Pericherla Categories: Basic. No Comments on Java program for demonstrating methods and method overloading

Aim To write a program for demonstrating methods and method overloading.   Theory One of the ways through which Java supports polymorphism is overloading. It can be defined as creating two or more methods in the same class sharing a common name but different number of parameters or different types of parameters.   You should […]

Read the rest of this entry »

Java program for demonstrating constructors

Suryateja Pericherla Categories: Basic. No Comments on Java program for demonstrating constructors

Aim To write a program for demonstrating constructors.   Theory A constructor is a special method which has the same name as class name and that is used to initialize the objects (fields of an object) of a class. A constructor has the following characteristics: Constructor has the same name as the class in which […]

Read the rest of this entry »

Java program for demonstrating data types, variables, operators, arrays, and control structures

Suryateja Pericherla Categories: Basic. No Comments on Java program for demonstrating data types, variables, operators, arrays, and control structures

Aim To write a program for demonstrating data types, variables, operators, arrays, and control structures in Java.   Theory Data Types A data type specifies the type of value a variable can store or the type of an expression. Java is a strongly typed language means that you should specify the type of a variable […]

Read the rest of this entry »

Program for demonstrating the basic structure of a Java program

Suryateja Pericherla Categories: Basic. No Comments on Program for demonstrating the basic structure of a Java program

Aim To write a program for demonstrating the basic structure of a Java program.   Theory A Java program is a collection of one or more classes, in which, one class contains the main method. Before looking at the structure of a Java program, let’s see the structure of a Java class. Structure of a […]

Read the rest of this entry »

Java program to check whether the number is an armstrong number or not

Suryateja Pericherla Categories: Basic. No Comments on Java program to check whether the number is an armstrong number or not

In this article we will learn to implement a Java program to check whether the number is an armstrong number or not.   Armstrong number is one in which the sum of the cubes of individual digits is same as the given number. For example if you take the number 153, (1^3) + (5^3) + […]

Read the rest of this entry »

Java program to find given number is palindrome or not

Suryateja Pericherla Categories: Basic. No Comments on Java program to find given number is palindrome or not

In this article we will learn to implement a Java program to find given number is palindrome or not. A Java program is provided below which reads a number and prints whether it is a palindrome or not.   A palindrome is one which is same after reversing it. For example, if you take a […]

Read the rest of this entry »

Java program to find the reverse of a given number

Suryateja Pericherla Categories: Basic. No Comments on Java program to find the reverse of a given number

In this article we will learn to implement a Java program to find the reverse of a given number. A Java program is provided below which reads a number from the user and prints the reverse of that number:   Program is as follows: import java.util.Scanner; public class Driver { public static void main(String[] args) […]

Read the rest of this entry »

Java program to find the factorial of a number using recursion

Suryateja Pericherla Categories: Basic. No Comments on Java program to find the factorial of a number using recursion

In this article we will learn to implement a Java program to find the factorial of a number using recursion. A Java program is provided below to read a number and print the factorial of that number.   Following program reads a number form the user and prints its factorial using recursion: import java.util.Scanner; public […]

Read the rest of this entry »

Java program to check if a given character is vowel or consonant

Suryateja Pericherla Categories: Basic. No Comments on Java program to check if a given character is vowel or consonant

In this article we will learn to implement a Java program to check if a given character is vowel or consonant. Following Java program reads a character from the user and prints out whether it is a vowel or not: import java.util.Scanner; public class Driver { public static void main(String[] args) { Scanner input = […]

Read the rest of this entry »

Java program to print even numbers in the range 1 to n

Suryateja Pericherla Categories: Basic. No Comments on Java program to print even numbers in the range 1 to n

In this article we will learn to implement a Java program to print even numbers in the range 1 to n. Following java program reads n value from the user and prints even numbers in the range 1 to n.   Program is as follows: import java.util.Scanner; public class Driver { public static void main(String[] […]

Read the rest of this entry »
Blogarama - Blog Directory