Monthly Archives: October 2019

Java Palindrome String Check

Task: Write down a Java String Program to check for Palindrome. The Source Code of Java Program Check for Palindrome import java.util.Scanner; /** * * @author www.EasyCodeBook.com */ public class StringPalindrome { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print(“Enter a String to check for Palindrome: “); String s1=input.nextLine(); String s2=””;… Read More »

 483 total views

Java String Class Reverse Program

Task: Write a Java String Class Reverse Program. You have to use only String class objects and String class built-in methods to reverse a user supplied string. Logic behind Java String Reverse Program You will use the following standard methods provided in String class: length() method to know the length of the original string. charAt(index)… Read More »

 284 total views,  1 views today

Java Day Number to Name switch Program

Task: Java Day Number to Name switch Program Java Program – The Use of Switch Statement through practical Java programming- Input a day number from the user Display Day Name. Source Code – Java Day Number to Name switch Program /* * Java Program – The Use of Switch Statement * Input a day number… Read More »

 123 total views

Creating New Box class in Java

Task: Write a Java program to create a new Box class in Java. Use three instance variables width, height and depth of type double. Write down two constructors. Default ( no-arg )constructor will intialize the Box class objects with 0.0 value for all instance variables. A parameterized constructor will be used to intialize the object… Read More »

 843 total views,  2 views today