Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions

Question

List the four steps in the delegation process.

Answered: 1 week ago