- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 3
- Posts with Downvotes
- 2
- Downvoting Members
- 2
Re:
import java.util.*; import java.io.*; public class stundentGrade { public static void main(String args [])throws IOException{ BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in)); int a=0, b=0,c=0,d=0,f=0, totalNumber=0; //declaration of initialization stars(); //method to call and print stars System.out.println("Enter a list of Exam scores from 0-100" ); System.out.println("use a negative number if you'r … | |
Re:
Exception message is not showing import java.util.*; class WrongException extends Exception{ public WrongException(String s){ super(s); } } public class UserDefinedException2{ public static void main(String s[]){ int a,b; a=b=0; Scanner ob=new Scanner(System.in); System.out.print("Enter your age = "); a=ob.nextInt(); try { if(a<=0) throw new WrongException("age cannot be zero or nagetive"); System.out.print("age = … |