Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Will someone help me with this? package applesandoranges; import java.util.Scanner; public class Applesandoranges { public static void main(String[] args) { Scanner scnr = new Scanner(System.in);

image text in transcribedWill someone help me with this? package applesandoranges; import java.util.Scanner; public class Applesandoranges { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); //apple and oranges stock replenishment int applesQty=0; // User input present Qty int applesMax=100; // Max stock capacity int orangesQty=0; // User input present Qty int orangesMax=1000; // Max stock capacity int applesneed=0; int orangesneed=0; System.out.println("Enter Apples Qty."); applesQty= scnr.nextInt(); System.out.println("Enter Oranges Qty."); orangesQty= scnr.nextInt(); //if applesQty is

applesandoranges NetBeans IDE 8.2 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Search (Ctrl-+I) X| Files Servi | -|| Start Page x azifruits inventory.jsx x Applesandoranges.java JoptionPane.java X pesandoranges Source Packages applesandoranges JoptionPane.jav|| 10| public static void main (String [] args) Test Packages ibraries Test Libraries Scanner scnr - new Scanner (System.in): // apple and oranges stock replenishment int applesQty 0;// User input present QTY int applesMax100:// Max stock capacity int orange sQty 0:// User input present Qty int orangesMax-100:// Max stock capacity 12 14 17 System.out.printin ("Enter on hand applesQty- scr nextint )://appleQty is the amount of stock on hand. applesMax- scr.nextInt://applesMax is the maximum stock capacity orangesQty scr.nextInt):// orangesQty is the amount of stock on hand orangesMax- scr.nextInt):// orangesMax the maximum stock capacity. System.out.print (scnr) int applesneed = applesMax - applesQty; int orangesneed orangesMax-orangesQty: m-applesMax amount needed. " 23 25 27 main NavigatorX Members 28 Applesandoranges 30 main(Stringl args) applesandoranges.Applesandoranges > main Output X Debugger Console X applesandranges (run) x Exception in thread "main" java.lang. RuntimeException: Uncompilable source codeErroneous tree type: any at applesandoranges. Applesandoranges main (Applesandoranges.java:18) C:NUserslanorAppData\Local\NetBeans\Cache\8.2 executor-snippets un.xml:53 Java returned 1 BUILD FAILED (total time: 0 secondds) 10:3

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

More Books

Students also viewed these Databases questions