Exception
Exception
Problem statement:
Get the input String from user and parse it to integer, if it is not a number it
will throw number format exception Catch it and print "Entered input is not a valid
format for an integer." or else print the square of that number. (Refer Sample
Input and Output).
Sample input and output 1:
Enter an integer: 12
The square value is 144
The work has been done successfully
Sample input and output 2:
Enter an integer: Java
Entered input is not a valid f
Write a program that takes as input the size of the array and the elements in the
array. The program then asks the user to enter a particular index and prints the
element at that index. Index starts from zero.
Aswin C9:19 AM
Write a Program to take care of Number Format Exception if user enters values
other than integer for calculating average marks of 2 students. The name of the
students and marks in 3 subjects are taken from the user while executing the
program.
In the same Program write your own Exception classes to take care of Negative
values and values out of range (i.e. other than in the range of 0-100)
Abstract
INTERFACE
Write a class called Veena which implements Playable interface. Let this class be
placed in a package music.string
Write a class called Saxophone which implements Playable interface. Let this class
be placed in a package music.wind