Java program to perform multiplication of two number without using * operator

Java program to perform multiplication of two number without using * operator   Java supports different types of Operators. Operators can be classified into numbers of categories: Arithmetic operators, Bitwise operators, Logical Operators, Conditional operators, Assignment Operators, Relational operators, Special operators, Increment Operators, Decrement operators. Java program to perform multiplication of two number without using * … Read more

Java MCQ quiz summary on MultiThreading.

What is Java MCQ quiz summary? Java  MCQ quiz summary consist of all points and notes which may be asked in a technical aptitude round of most of the  interview. In this post you will get all the short and simple key point which are generally asked in most of the exam. We have covered … Read more

IT jobs in pune for freshers

Searching for jobs in Pune? Look no further. We, at staylearner provide you the curated list of IT jobs for freshers in Pune and other states. Edit: We keep updating this list regularly. A post you may have seen a week ago might not be there today. So, please keep yourself updated by visiting this site. … Read more

Square root of Number

import java.io.*; import java.util.*; class SquareRoot { public static void main(String args[]) { Scanner sc=new Scanner(System.in); System.out.println(“Enter the any value”); int no=sc.nextInt(); System.out.println(“The square root of number is “+Math.sqrt(no)); } }  

Concatenate string

import java.io.*; import java.util.*; class Concatenate { public static void main(String args[]) { String s1=”java”; String s2=” is a programming Language”;System.out.println(s1); System.out.println(s1.concat(s2)); } }  

Compare two String

import java.io.*; import java.util.*; class Compare { public static void main(String args[]) { String s1=”java”; String s2=”java”;System.out.println(“The comparision of string is “+s1.equals(s2)); } }  

Java Program to find Factorial of number- 7 different ways

Java Program to find Factorial of number- 7 different ways 1. Java Program to find Factorial of number using for loop: Program: import java.io.*; import java.util.*; class Factorial { public static void main(String args[]) { int i,fact=1; System.out.println(“Enter any number”); Scanner sc=new Scanner(System.in); int n=sc.nextInt(); for(i=1;i<=n;i++) { fact=fact*i; } System.out.println(“The factorial of “+n+ ” is … Read more

Divisible by 5

import java.io.*; import java.util.*; class DivisibleByFive { public static void main(String args[]) { String m=””; for(int i=200;i<=800; i++) { if(i%2!=0 && i%5==0) { m = m+i; } } System.out.println(m);} }  

String Length

import java.io.*; import java.util.*; class StringLength { public static void main(String args[]) { String a=”Java”; String b=”is a programming”; String c=”language”;System.out.println(a.length()); System.out.println(b.length()); System.out.println(c.length()); } }  

String Palindrome

import java.io.*; import java.util.*; class Palindrome { public static void main(String args[]) { Scanner sc= new Scanner(System.in); System.out.println(“Enter any string”); String s1=sc.nextLine(); StringBuffer sb=new StringBuffer(s1); System.out.println(sb); sb.reverse(); System.out.println(sb); String s2=sb.toString(); boolean b=s1.equals(s2); if(b==true) { System.out.println(“Given String is palindrome”); } else { System.out.println(“Given String is not palindrome”); } } }