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
Leya [2.2K]
3 years ago
12

Assume that the following variables have been properly declared and initialized.

Computers and Technology
1 answer:
grandymaker [24]3 years ago
4 0

Answer:

       if (option1.equals(option2)){

           rsvp = true;

       }

       System.out.println(rsvp);

A full program is given in the explanation section

Explanation:

import java.util.Scanner;

public class Option {

   public static void main(String[] args) {

       boolean rsvp = false;

       int selection;

       String option1,option2;

       Scanner in = new Scanner(System.in);

       option1 = in.next();

       option2 = in.next();

       if (option1.equals(option2)){

           rsvp = true;

       }

       System.out.println(rsvp);

   }

}

You might be interested in
What is the cheapest type of printer to buy and run?
myrzilka [38]
It depends solely on how much you will use it. For example, laser printers are more suitable for offices, schools, and environments, where the printer is used almost constantly. If it's used a lot, you're probably looking at a laser printer, since the cartridges have a slightly higher price, but a much higher yield. If you can't afford a laser printer, and you're only going to use it at home, you're probably looking at an inkjet. If you need to print off something for school, ask your teacher, or someone that works at your school. Some secondary/high schools might allow you to use their printers at a lower price
7 0
4 years ago
Read 2 more answers
Consider the code below. Note that the catch statements in the code are not implemented, but you will not need those details. As
Dmitriy789 [7]

Missing Part of Question

An exception raised by the instruction in i3 would be caught by the catch statement labeled?

Answer:

e3 and e4.

Explanation:

The instruction tag i3 points to the following code segment

a[++i] = (double) (1 / x); // i3

The code segment above performs arithmetic operation (double)(1/x)

And then assigns the value of the arithmetic operations to an array element a[++I]

It's possible to have one or both of the following two exceptions.

1. Error in Arithmetic Operation

2. Index of Array out of bound

These are both represented in exception tags e3 and e4

catch (ArithmeticException ex) {...} // e3

catch (ArrayIndexOutOfBounds ex) {...} // e4

Exception e3 can arise when the program try to carry out invalid arithmetic operation.

For instance, 1/0 or 0/0.

This will lead to ArithmeticException to be thrown

Exception e4 can arise when the program tries to assign values to an index that's not in an array.

Say, the total index in a given array a is 5.

The index of this array is 0 to 4; i.e. a[0] to a[4]

The moment the program tries to assign values to array element other than the ones I listed above (e.g a[5]) ArrayIndexOutOfBounds exception will be thrown

6 0
3 years ago
Nonverbal communication includes _____.
aliya0001 [1]

Answer:

i think the answer is body language

Explanation:

body language is non-verbal

8 0
3 years ago
Read 2 more answers
To which type of server will you transfer resources so that your colleagues cam aslo use them ?
Alborosie
Google drive or Dropbox. Services like that.
7 0
4 years ago
What is the difference between EDX and the OCW?
ohaa [14]
<span>OCW is the material used for various online courses offered by MIT, while EDX is the course itself in which you will be able to receive a certification if you passed all the requirements needed to be accomplished. In this course you are graded based on your knowledge.

</span>
7 0
4 years ago
Other questions:
  • Randy is concerned about his company’s data security on the Internet. Because cellular signals are not encrypted, he is concerne
    6·1 answer
  • Mike wants to build an amplifier. Which technology can he use?
    15·1 answer
  • Which group on the Home Ribbon allows you to add shapes to a PowerPoint slide?
    10·2 answers
  • Which type of computer network ensures high quality​
    9·1 answer
  • In excel what is the biggest disadvantage of copying a worksheet into another workbook?
    15·1 answer
  • MSSQL
    10·1 answer
  • Which programming language is fortnite created in?
    11·2 answers
  • Which of the following describes a potentially damaging computer program that affects, or infects, a computer negatively by alte
    9·2 answers
  • Can anybody answer this?
    13·1 answer
  • What is wrong with line 3 ?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!