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
Which of the following is a hand-drawn animation that takes a large amount of time to complete?
elixir [45]

Answer:

Where are the choices?

Thanks for adding the choices at the comment secion

  1. 2D animation
  2. 3D animation
  3. Stop Motion  
  4. Celluloid animation

A- Celluloid Animation

4 0
3 years ago
Read the two sentences below. Then select the response that best describes the verb tense used in the sentences.
N76 [4]
I would say A because it was talking about something in the present but what they were talking about was in past. so I would think A
6 0
3 years ago
Write a function called countstuff () that takes as a parameter a character array, and returns an int. The prototype must be:
PSYCHO15rus [73]

Answer:

Please kindly go to the explanation part.

Explanation:

The required function is written in Raw code below.

Function:

#include<stdio.h>

#include<ctype.h> //including required libraries

int countstuff(char s[]){ //Function countstuff

int cntUp=0,cntLow =0,cntDigits = 0,i=0,value; //declaring required variables

for(i=0;s[i]!='\0';i++){ //loop to iterate over the characters of string

if(isupper(s[i])){

cntUp++; //incrementing count of uppercase if it is uppercase character

}

else if(islower(s[i])){

cntLow++; //incrementing count of lowercase if it is lowercase character

}

else if(isdigit(s[i])){

cntDigits++; //incrementing count of digits if it is digit

}

}

value = cntUp*1000000 + cntLow*1000 + cntDigits; //counting value using formula given in question

return value; //returning the value

}

void main(){

char string[1000]; //declaring required variables

int value;

printf("Enter a String:");

scanf("%[^\n]s",string); //taking string as input

value = countstuff(string); //calling function

printf("The Value is : %d\n",value); //printing result

}

5 0
3 years ago
With a ____ indent, all lines except the first line of the paragraph are indented from the left margin.
hoa [83]

The answer to this question is a hanging indent. A hanging indent is a writing format where in the first line of the text or paragraph is being aligned in the left margin. A hanging indent is also known as the hanging paragraph.  

3 0
3 years ago
Consider the following statements regarding computer programs A - Variables can contain different values at different times.B -
jeka94

Answer:

The answer is: Only A is correct.

Explanation:

Variables in a program can assume different values at different times, and the program can then produce different results, depending on circumstances, so A is correct.

In a computer language, a reserved word (also known as a reserved identifier) is a word that cannot be used as an identifier, such as the name of a variable, function, or label – it is "reserved from use". This is a syntactic definition, and a reserved word may have no meaning. So, B is incorrect.

Hence, the answer is: Only A is correct.

6 0
3 years ago
Other questions:
  • A company has a file server that shares a folder named Public. The network security policy specifies that the Public folder is a
    14·1 answer
  • To include totals and other statistics at the bottom of a datasheet, click the ____ button on the HOME tab to include the Total
    12·1 answer
  • Who's YouTube creator?
    10·2 answers
  • Evaluate the following expression with precedence of operator:<br> ​ X = 2* 3/ 5 + 10 //3 – 1
    13·1 answer
  • What is one way to recognize whether an online source has been copyrighted? The source features the phrase “all rights reserved.
    6·2 answers
  • Given a constant named size with a value of 5, which statement can you use to define and initialize an array of doubles named ga
    12·1 answer
  • Explain the difference between undecidable problems and unreasonable time algorithms. Be specific.
    5·1 answer
  • How do I install another part on campaign call of duty cold war? please help.(best answer will get branliest.)
    15·2 answers
  • Write a program in python to make the figure:-
    12·1 answer
  • Exam Instructions
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!