Question: ublic static void main(Stringt args) Scanner scannew Scanner (System.in) System.out.println(Enter the coordinates for the rectangular portion , as - : String point inLnextLine().split(- Point[ 0]point[0].substring

 ublic static void main(Stringt args) Scanner scannew Scanner (System.in) System.out.println("Enter the

ublic static void main(Stringt args) Scanner scannew Scanner (System.in) System.out.println("Enter the coordinates for the rectangular portion , as-: String point inLnextLine().split("-" Point[ 0]point[0].substring (1,point[0].length()-1); Point [1] = point [1] . substring (1,point [1]length ()-1); String P1 Point[0].split("," String P2[]-Point[1].split("," int xl -Integer.parseInt (P1 [01) int yl = Integer.parseInt ( Pl[1]); int x2 Integer.parseInt (P2 0]); int yl Integer.parseInt (p2[1]) int side 1 = x2 - x1; int side2 - yl - y2; ); e Messages jGRASP Messages Run I/O Interactions jGRASP exec: javac-g Asgn2.java Asgn2.java:21: error: class expected String point]- int.nextLine).split("-" Asgn2.java:21: error: expected string point[] = int.nextLine ( ).split("-"); 2 errors

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!