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
Businesses around the world all need access to the same data, so there
Alexxx [7]

Answer:

B

Explanation:

3 0
2 years ago
Which occurs during market equilibrium? Check all that apply
e-lub [12.9K]

Answer:

Explanation:

You do not have options please be more in depth it would help me with your question.

4 0
3 years ago
I will give brainliest !!
OverLord2011 [107]
Do these questions have given answers already?
3 0
2 years ago
When using Internet explore what options will empty the log of Internet sites you have recently viewed
alexira [117]
I think it’s clear history
7 0
3 years ago
Data hiding, which means that critical data stored inside the object is protected from code outside the object, is accomplished
algol [13]

Answer:

Option (D) using the private access specifier on the class fields

Explanation:

  • The private access modifier can be used to hide the data.
  • Methods and data variables ( fields ) can be declared with the private access modifier.
  • Data hiding is a OOPS Concept which can be achieved with the private keyword (private access modifier).
  • The access modifiers are of types Public, Private, Protected and Default ( no access modifier - no need to explicitly specify the default keyword).
  • Data hiding means to hide the data, the data is contained in the class variables.So, option (d) using private access modifier on the class fields is correct option.
  • Option (A) is wrong as the using the public access modifier doesn't hide anything. It is public and is visible to the public.
  • Option (B) is wrong as using the private access modifier on the methods means it is hiding the implementation of the methods not the data.
  • Option (C) is wrong as using private access modifiers on class definition means making the classes not visible to other classes it doesn't mean data hiding as the data is contained in the class variables.
7 0
3 years ago
Other questions:
  • Information permanently stored on a hard disk, diskette, cd-rom disk, or tape, is called ________ storage.
    8·1 answer
  • What is one example of technology influencing health​
    9·1 answer
  • A doorknob is an example of which simple machine?
    10·2 answers
  • Which Ribbon contains the paragraph attributes?<br><br> Home<br> Insert<br> Review<br> View
    8·2 answers
  • For the function definition int SomeFunc( /* in */ int alpha, /* in */ int beta ) { int gamma; alpha = alpha + beta; gamma = 2 *
    6·2 answers
  • The appropriate semaphore in C to give one more turn to writer so it can clean up IPC objects is WRITE_SEM. Is it true or false
    5·1 answer
  • What has happened (or is still happening) to make this speech occur? armageddon
    15·1 answer
  • Which of the following networks had these two goals: a) allowing scientists to work together on scientific projects; and, b) fun
    8·2 answers
  • Tell four permanent icons on the desktop​
    14·1 answer
  • History of computer from difference engine <br>​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!