subject

Public class illustrate
{
private int x;
private int y;

public illustrate()
{
x = 1;
y = 2;
}

public illustrate(int a)
{
x = a;
}

public void print()
{
system. out. println("x = " + x + ", y = " + y);
}

public void incrementy()
{
y++;
}
}
what does the default constructor do in the class definition above?

1. sets the value of x to 0
2. there is no default constructor.
3. sets the value of x to 1
4. sets the value of x to a

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:30, mitalichavez1
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 3
image
Computers and Technology, 22.06.2019 20:00, BreadOfTheBear
What statement best describes operating systems? it’s possible for modern computers to function without operating systems. most operating systems are free or very inexpensive. operating systems are managed by the computer’s microprocessor (cpu). operating systems manage the computer’s random access memory (ram).
Answers: 1
image
Computers and Technology, 23.06.2019 06:00, jack487
How can a user delete a drawing object
Answers: 1
image
Computers and Technology, 23.06.2019 19:30, carcon2019
Amitha writes up a one-page summary of a novel during her summer internship at a publishing company. when she reads over the page, she realizes she used the word “foreshadow” seven times, and she would like to reduce the repetition. which tool would best amitha solve this problem?
Answers: 3
You know the right answer?
Public class illustrate
{
private int x;
private int y;

public i...

Questions in other subjects:

Konu
Mathematics, 11.06.2021 22:30
Konu
English, 11.06.2021 22:30
Konu
Mathematics, 11.06.2021 22:30