1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tangare [24]
3 years ago
7

A method named 'withdraw' in the CheckingAccount class throws a custom exception named 'OverdrawnException'. You want to scan in

the value of the withdrawal amount from a file, and you need to make sure that the scanner is closed whether the withdrawal is successful or not. Fill in the blank to complete the code below to do that.
Scamner sconfiLe -muil: try t scanFile new Scanner(myFile); myAccount.withdrow(scanFile.nextDouble)); System.out.println(oe.getMessageC); if (scanFile! null) catch (OverdrawnException oe) f th all of
scanFile.close ():
}
}
Computers and Technology
1 answer:
andrew-mc [135]3 years ago
8 0

Solution :

Scanner scanFile = null;

try {

scanFile = new Scanner(myFile);

myAccount.withdraw(scanFile.nextDouble());

} catch (OverdrawnException oe){

System.out.println(oe.getMessage());

} finally {

if (scanFile != null){

scanFile.close();

}

}

You might be interested in
Which of the following is the largest disadvantage of wind power?
nydimaria [60]
The answer is     C.wind machines only generate electricity when wind is blowing
3 0
3 years ago
Read 2 more answers
If you enter the search "genetically modified foods" in a database, the double quotes around the three words will:
In-s [12.5K]

Answer:

Have a more specified search

Explanation:

If you do this in G0OGLE Then it will be the same thing all it basically does it narrow down the search to find more of what you want

4 0
3 years ago
Dashed lines that display on your slide when you are moving an object and that assist you with alignment are referred to as:
Umnica [9.8K]
Smart guides is the answer.
7 0
3 years ago
Read 2 more answers
What is thesql command to list the total sales by customer , month , and product, with subtotals by customer and by month and a
alexira [117]

Answer:

The answer is below

Explanation:

The the sql command to list the total sales by customer , month , and product, with subtotals by customer and by month and a grand total for all product sales is:

SELECT S.CUS_CODE, T.TM_MONTH, S.P_CODE,

SUM(S.SALE_UNITS*S.SALE_PRICE) AS "TOTSALES"

FROM DWDAYSALESFACT AS S INNER JOIN DWTIME AS T ON S.TM_ID =

T.TM_ID

GROUP BY S.CUS_CODE,T.TM_MONTH,S.P_CODE WITH ROLLUP;

4 0
3 years ago
According to Android’s suggested user interface standards, repeatedly pressing the app icon on an app’s action bar will eventual
marusya05 [52]

Answer:

False

Explanation:

No app icon on app's action bar will move the device  to its home screen.It is not a valid statement.

8 0
3 years ago
Read 2 more answers
Other questions:
  • At regular intervals the AP in an infrastructure network or wireless device in an ad hoc network sends a ____ frame both to anno
    8·1 answer
  • Samantha writes technical content for a webpage and uploads it to the webpage. What should she do to ensure that the content, wh
    11·2 answers
  • Which commas is used to combine two or more cells together into one cell
    11·1 answer
  • If there is a circuit that is being used 36 CCS then how much of that circuit is being used in Erlang?
    8·1 answer
  • A computer consists of both software and hardware. a)Define the term software​
    5·1 answer
  • What is software and explain the five types of software
    5·2 answers
  • A corporate or government network that uses Internet tools, such as Web browsers, and
    13·1 answer
  • An alternative to configuring individual workstations is to establish configurations dynamically when the computers connect to t
    7·1 answer
  • 1. If an android phone is out of date or outdated and it requires an update. Explain the steps how I can update this phone.
    15·2 answers
  • explain the following joke: “There are 10 types of people in the world: those who understand binary and those who don’t.”
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!