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
liberstina [14]
4 years ago
11

Write a try block in which you prompt the user for an integer and display the name in the requested position in the names array.

Create a catch block that catches the potential ArrayIndexOutOfBoundsException thrown when the user enters a number that is out of range. The catch block should also display the error message: Subscript out of range.
Computers and Technology
1 answer:
N76 [4]4 years ago
8 0

Explanation:

try{

     String[] names={"Tom","Suzie","Lina","Harry","Rosy"};

     Scanner input=new Scanner(System.in);

     System.out.println("Enter an integer: ");

     int position=input.nextInt();

     System.out.println(names[position]);

   }catch(ArrayIndexOutOfBoundsException e){

     System.out.println("Subscript out of range.");

   }

You might be interested in
An electronic ____ is an application you use to perform numeric calculations and to analyze and present numeric data.
attashe74 [19]

An electronic \sf\purple{spreadsheet} is an application you use to perform numeric calculations and to analyze and present numeric data.

\bold{ \green{ \star{ \orange{Mystique35}}}}⋆

7 0
3 years ago
What does the Control Panel's Display icon allow you to do?
UNO [17]

Answer: To have access to all the hardware and software settings in your computer system.

Explanation:

4 0
3 years ago
The protection of intellectual property (ip) is an example of what kind of information security need?
timama [110]

The protection of intellectual property (IP) is an example of Confidentiality of information security need, Unauthorized disclosure of intellectual property might result in the loss of whatever competitive advantage the IP may have provided the company.

What is considered IP?

Any creation of human intelligence that is shielded by the law from illegal use by others is generally referred to as intellectual property. A limited monopoly over protected property is inevitably created by the ownership of intellectual property.

Who owns intellectual property?

A work's owner is typically considered to be its creator. But for various kinds of property and in various situations, intellectual property ownership can be decided in various ways. For instance, if a piece of work is produced for a client, the client is the owner of that intellectual property.

Learn more about intellectual property: brainly.com/question/18650136

#SPJ4

3 0
2 years ago
NEEEEEEEEEEEEEEEEEEEEEEEEEEED HELP PLZ HURRYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
AveGali [126]

Answer:

The first step after selecting the File tab is to select <u>New</u>

Explanation:

Invoice templates are used in order to streamline the billing in business.

In order to use such templates by fetching them online such as from Office.com following steps should be followed:

  • Start the Microsoft Word software.
  • Click on File tab.
  • From the drop down memory choose New.
  • In the Search menu type Invoices and it will display all available templates of Invoices.
  • On the homepage, their will be be an option for More Templates below the available ones. Click on it and choose the Category from left and click Invoices.
  • Select the template you want to use.

<h3>I hope it will help you!</h3>
7 0
4 years ago
Look at comments and read it please.
Brilliant_brown [7]

Answer: I need a point bruhhh

Explanation:

3 0
3 years ago
Other questions:
  • You can select a paragraph y using the ____key.
    10·1 answer
  • Pls help............
    9·2 answers
  • The shortest-route technique would best be used to determine the amount of LAN network wiring within a building. determine the p
    12·1 answer
  • Does anyone know the answer to this question
    9·1 answer
  • Which kind of system software tells the computer how to communicate with peripherals, such as a prero
    6·2 answers
  • The ________ is responsible for the Internet's domain name system and the allocation of IP addresses.
    12·1 answer
  • Asymmetric key encryption combined with the information provided by a. certificate authority allows unique identification of the
    8·1 answer
  • Which TWO objects are likely to have SSD chips in them?
    5·2 answers
  • I'm lonely every 14 and up come talk
    5·2 answers
  • Your ISP connects to the core routers of the Internet via a O backbone O satellite O cable mode Ospine​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!