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 that checks whether a given string is a palindrome or not

Categories: Strings. 1 Comment on Java program that checks whether a given string is a palindrome or not

In this article we will learn to implement a Java program that checks whether a given string is a palindrome or not. A Java program is provided below that reads a string, checks whether it is a palindrome or not.   Program is as follows: import java.util.*; class Palindrome { void isPalindrome(String str) { String […]

Read the rest of this entry »

Java program for matrix multiplication and matrix transpose

Categories: Arrays. No Comments on Java program for matrix multiplication and matrix transpose

In this article we will learn to implement a Java program for matrix multiplication and matrix transpose. A Java program is provided below to check the compatibility for multiplication, if compatible, multiplies two matrices and also finds its transpose. import java.util.Scanner; class Matrix { void matrixMul(int m, int n, int p, int q) { int[][] […]

Read the rest of this entry »

Java program to print the nth element in the Fibonacci series

Categories: Basic. No Comments on Java program to print the nth element in the Fibonacci series

In this article we will learn to implement a Java program to print the nth element in the Fibonacci series. A Java program is provided below to print the nth element in the Fibonacci series using both non-recursive and recursive methods.   Program is as follows: import java.util.*; class Fibonnaci { int nFib(int n) { […]

Read the rest of this entry »

Basic array programs in Java

Categories: Arrays. No Comments on Basic array programs in Java

In this post we are going to look at some very basic and frequently asked array programs in Java interviews . Different programs are written as separate functions in the class ArrayClass. These programs are restricted to integers. Following programs are available: Reading elements into an array Printing elements in an array Printing the sum of […]

Read the rest of this entry »