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
NeTakaya
3 years ago
14

You are given a class named Clock that has one int instance variable called hours.

Computers and Technology
1 answer:
Vlad [161]3 years ago
7 0

Answer:

public Clock(int hours) {

       this.hours = hours;

   }

Explanation:

In Java programming language, Constructors are special methods that are called to initialize the variables of a class when a new object of the class is created with the new keyword. Consider the complete code for the class below;

<em>public class Clock {</em>

<em>    private int hours;</em>

<em>    public Clock(int hours) {</em>

<em>        this.hours = hours;</em>

<em>    }</em>

<em>}</em>

In this example above,  an object of this class can created with this statement Clock myclock = new Clock(6); This is a call to the constructor and passes a parameter (6) for hours

You might be interested in
L
Artist 52 [7]

Answer:

I tried, I falid, I sorry :(

Explanation:

......

5 0
3 years ago
As technology advances, does it require science and math applications? Provide 1 to 3 examples.
Rina8888 [55]

Less because computers can do almost everything for you . ... Yes it is more efficient because they are making more things that computers and cell phones can do for you.

8 0
3 years ago
Why the brain is most important???​
algol [13]

Answer:

It helps our body function

Explanation:

3 0
3 years ago
Read 2 more answers
What are advantages of using document templates?
Sergeeva-Olga [200]

The benefits of using templates. Creating new documents for every opportunity your company approaches can waste valuable time and money. Instead, focus on original, internal templates that can be utilized for a variety of projects, including enterprise communications, as well as customer projects

4 0
3 years ago
Read 2 more answers
Which statements are true about mysql workbench? (choose three)
nika2105 [10]

Answer:

Many things are true about it

3 0
3 years ago
Other questions:
  • Which structural adaptation would help a plant survive better in a shady environment?
    14·2 answers
  • What is the most efficient way to include a space after each paragraph?
    13·2 answers
  • Who would use a magnetic hard drive? Give a scenario and include examples as well as detail.
    5·1 answer
  • What are the advantages of a diverse workforce? Select all that apply.
    6·2 answers
  • If you enter 234.567 into a cell that is formatted to display 1 decimal place, what is the value stored in the cell?
    13·1 answer
  • What is the biggest type of gear?<br><br>A. Spur<br>B.Worm<br>C.Wheel<br>D.Pinion
    6·2 answers
  • You use a(n) ____ program to create, send, receive, forward, store, print, and delete e-mail messages.
    15·1 answer
  • Which type of word processing programs enables users to include illustrations within the program?
    10·2 answers
  • What is the relationship between an object and a class? A. An object is an instance of a class. B. A class is an instance of an
    5·1 answer
  • What are the functions of information technology?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!