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
Sunny_sXe [5.5K]
3 years ago
13

Which of the following correctly declares and initializes a Scanner object that will use input from the keyboard as its data sou

rce? *
1. Scanner keyboard = new (System.in);
2. Scanner keyboard = new Scanner (keyboard);
3. Scanner = new Scanner(System.in);
4. Scanner keyboard = new Scanner (System.in);
Computers and Technology
2 answers:
zepelin [54]3 years ago
5 0
Option 4 is correct.........
Norma-Jean [14]3 years ago
5 0

Answer:

it 4

Explanation:

You might be interested in
Aiming high means???
Llana [10]

Answer:

in what context is it in? it could be aim high for goals set limits that are hard to reach but not impossible

Explanation:

5 0
3 years ago
________ are typically comprised of a mix of ________ and ________.
zaharov [31]
Your answer is "Mutual funds; stocks; bonds".
8 0
4 years ago
Read 2 more answers
Hello, my first time being here and I'm returning back from college and I'm now studying Java in college but I was stuck doing t
KengaRu [80]

Answer:

import java.time.LocalDate;

class TestWedding {

 public static void main(String[] args) {

   Person man1 = new Person("John", "Doe", LocalDate.parse("1990-05-23"));

   Person woman1 = new Person("Jane", "Something", LocalDate.parse("1995-07-03"));

   Person man2 = new Person("David", "Johnson", LocalDate.parse("1991-04-13"));

   Person woman2 = new Person("Sue", "Mi", LocalDate.parse("1997-12-01"));

   Couple cpl1 = new Couple(man1, woman1);

   Couple cpl2 = new Couple(man2, woman2);

   Wedding wed1 = new Wedding(cpl1, "Las Vegas", LocalDate.parse("2020-09-12"));

   Wedding wed2 = new Wedding(cpl2, "Hawaii", LocalDate.parse("2021-01-02"));  

   displayDetails(wed1, wed2);

 }

 public static void displayDetails(Wedding w1, Wedding w2) {

   System.out.println(w1.toString());

   System.out.println(w2.toString());

 }

}

---------------------------

class Couple {

 private Person person1;

 private Person person2;

 public Couple(Person p1, Person p2) {

   person1 = p1;

   person2 = p2;

 }

 public String toString() {

   return person1.toString() + " and " + person2.toString();

 }

}

----------------------------

import java.time.LocalDate;

import java.time.format.DateTimeFormatter;

class Person {

 private String firstName;

 private String lastName;

 private LocalDate birthDate;

 public Person(String first, String last, LocalDate bdate) {

   firstName = first;

   lastName = last;

   birthDate = bdate;

 }

 public String getFirstName() {

   return firstName;

 }

 public String toString() {

   DateTimeFormatter formatter = DateTimeFormatter.ofPattern("LLLL dd, yyyy");

   return String.format("%s %s born %s", this.firstName, this.lastName, birthDate.format(formatter));

 }

}

------------------------------------

import java.time.LocalDate;

import java.time.format.DateTimeFormatter;

class Wedding {

 private Couple couple;

 private String location;

 private LocalDate weddingDate;

 public Wedding(Couple c, String loc, LocalDate wDate) {

   couple = c;

   location = loc;

   weddingDate = wDate;

 }

 public String getLocation() {

       return this.location;

 }

 public String toString() {

   DateTimeFormatter formatter = DateTimeFormatter.ofPattern("LLLL dd, yyyy");

   return  

     couple.toString() +  

     " are getting married in " + location + " on "+

     weddingDate.format(formatter);

 }

}

Explanation:

I used overrides of toString to let each object print its own details. That's why this solution doesn't really require any getters. I implemented some to show how it's done, but you'll have to complete it. The solution shows how to think in an OO way; ie., let every class take care of its own stuff.

6 0
3 years ago
If you must apply for a loan, you should _____. contact a broker and provide certain loan information visit a loan officer at a
azamat
B.) V<span>isit a loan officer at a financial institution and complete an application.</span>
4 0
3 years ago
Read 2 more answers
Which command shows the recommended way to display information about the network interface as well as its ip configuration?
tensa zangetsu [6.8K]
The "ipconfig" command in windows will show the configuration of all attached network interfaces.
7 0
3 years ago
Other questions:
  • How to open CD port in PC lenovo ideapad 330​
    14·1 answer
  • Which wildcat character will return a single character when using the find dialog box
    14·1 answer
  • Which computer applications can Mr. Crowell use to make the classroom learning more stimulating and interesting? Mr. Crowell has
    9·2 answers
  • Which of these files when included in a program will provide user assistance?
    13·2 answers
  • Although the Earth's crust formed relatively early in the Earth's history, it was not present when the Earth first began to form
    12·2 answers
  • Current versions of windows support file names up to ________ characters long
    5·1 answer
  • The text defines ________________ as the obsessive use of computers, or the unauthorized access and use of networked computer sy
    14·1 answer
  • What is the role of the W3C? Group of answer choices oversee research and set standards for many areas of the Internet supervise
    10·1 answer
  • Pig Latin is ______ and fits very naturally in the pipeline paradigm while SQL is instead declarative.
    7·1 answer
  • What is another term used for next generation firewalls
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!