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
Maurinko [17]
3 years ago
7

Which of the following could be a constructor for the public class MyClass? a. public MyClass() b. public void MyClass() c. publ

ic MyClass(int a, double b)
Computers and Technology
1 answer:
finlep [7]3 years ago
3 0

Answer:

A) public MyClass ()

C) public MyClass (int a, double b)

Explanation:

In Java Constructors are special methods used to initialize objects of a class and they are called when a new object is created with the new keyword.

Being a special method a constructor cannot not have a return type... not even void.

The name of the constructor must match the name of the class and constructors can also have parameter(s)

You might be interested in
Assume that an int variable age has been declared and already given a value. Assume further that the user has just been presente
Musya8 [376]

Using the knowledge of computational language in C++ it is possible to write a code that assume that an int variable age has been declared and already given a value

<h3>Writting the code:</h3>

<em>#include<stdio.h></em>

<em>#include<conio.h></em>

<em>int main()</em>

<em>{</em>

<em>//variables to rad choice and age</em>

<em>char choice;</em>

<em>int age;</em>

<em>//read age and choice</em>

<em>printf("\tEnter your age: ");</em>

<em>scanf("%d", &age);</em>

<em>//fflush the keyboard buffer before reading choice</em>

<em>fflush(stdin);</em>

<em>printf("\tEnter your choice: ");</em>

<em>scanf("%c", &choice);</em>

<em>//print the invalid message if the choice is otherthan the S,T,B</em>

<em>if(choice!='S' && choice !='T' && choice !='B')</em>

<em>{</em>

<em>printf("Invalid menu choice");</em>

<em>getch();</em>

<em>}</em>

<em>else if (age <22)</em>

<em>{</em>

<em>if (choice =='S')</em>

<em>{</em>

<em>printf("\tvegetable juice");</em>

<em>}</em>

<em>else if (choice =='T')</em>

<em>{</em>

<em>printf("\tcranberry juice");</em>

<em>}</em>

<em>else if (choice == 'B')</em>

<em>{</em>

<em>printf("\tsoda");</em>

<em>}</em>

<em>}</em>

<em>else</em>

<em>{</em>

<em>if (choice == 'S')</em>

<em>{</em>

<em>printf("\tcabernet");</em>

<em>}</em>

<em>else if (choice =='T')</em>

<em>{</em>

<em>printf("\tchardonnay");</em>

<em>}</em>

<em>else if (choice == 'B')</em>

<em>{</em>

<em>printf("\tIPA");</em>

<em>}</em>

<em>}</em>

<em>//pause the console output until user press any key on keyboard</em>

<em>getch();</em>

<em>}</em>

See more about C++ at brainly.com/question/19705654

#SPJ1

8 0
11 months ago
Will an email sent from a phone say it was sent from your phone
Morgarella [4.7K]
 Most emails sent<span> from devices like an </span>Android phone<span> or </span>Iphone<span> have an extra line at </span>the<span> ending which suggests that they have </span>sent their <span>replies
or </span>emails<span> using </span>their phones<span>.

So most likely, yes.</span>
6 0
3 years ago
Read 2 more answers
Imagine that you wanted to write a program that asks the user to enter in 5 grade values. The user may or may not enter valid gr
OLEGan [10]

Answer:

B. A "while" loop inside of a "for" loop

Explanation:

To enter 5 grade values, a for loop can be used to specify the number of grade values to be entered by the user, in other to ensure the validity of the grade values entered by the user, the while loop will be used inside the for loop such that the inputted values will only be accepted when the user enters a valid grade.

Code structure :

For a in range(0, 5) :

grade = input()

while grade (enter condition)

This is just the code structure and this will work for the problem stated.

5 0
2 years ago
What is zenmap typically used for? how is it related to nmap? describe a scenario in which you would use this type of applicatio
slava [35]

Zenmap is the graphical User Interface representation for NMAP Security Scanner. It is an open-source program designed to make NMAP easy for starters to use. Typically, it is used to collect and identify a list of hosts, OS, as well what services are running on them by using a port scanning tool. It is used specifically for the scanning and vulnerability phase of ethical hacking.

A network administrator who wishes to audit all the devices on a specific IP scheme in a network can use NMAP. The admin can go ahead and scan the ports to know exactly which ports are closed and which are opened.






8 0
3 years ago
The World Wide Web Consortium enforced a stricter set of standards in a different version of Hypertext Markup Language (HTML) ca
Eva8 [605]

Answer:

Option B is the correct answer for the above question

Explanation:

XHTML is an advanced version of HTML language which is recommended by W3C. It set the standard in 26-JAN-2000 for the XHTML which belongs to the family of HTML. XHTML is made with the help of XML and also used like XML. It used to create more secure websites.

The Above question asked about the W3C recommendation but the above paragraph described that XHTML is a W3C recommendation. Hence Option B is the correct choice answer. while the other is not because--

  • Option A suggests HTML 4.01 which is the updated version of HTML only.
  • Option C suggests XML which is used to data transfer only.
  • Option D suggests about DHTML but XHTML is a W3C recommendation
5 0
3 years ago
Other questions:
  • From the video "Your Password Sucks", using computer power to guess your password by trying multiple variations one after the ot
    15·2 answers
  • Blogs are typically written by large companies or organizations as a way to express formal, technical, or scholarly information
    5·2 answers
  • What is the rationale behind the development of an operating system in computing?
    15·1 answer
  • Choose a developing country and give 3 reasons why it is a developing country ​
    15·1 answer
  • Which two statements are true about the Data Sync functionality? (Choose two.)
    15·1 answer
  • Does white space have visual weight? Yes or No
    7·2 answers
  • Speed(?)
    5·1 answer
  • Which of the following is not a data visualization technique?
    6·1 answer
  • To what extent do you agree with the assertion that “Collection development begins with community analysis”. (Give reasons to bu
    7·1 answer
  • Write a method in pseudocode or Java called move that accepts a boolean[], integer value, and a boolean value. Your method shoul
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!