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
Mrrafil [7]
3 years ago
10

The number of arguments does not need to match the number in the parameter list when you use ____. 19. When can a method be call

ed with less arguments than exist in the parameter list for the method
Computers and Technology
1 answer:
photoshop1234 [79]3 years ago
3 0
<h2>Only when the default parameter are defined in the function</h2>

Explanation:

Answer is same for both the question.

  • A default argument or default parameter is assigned an automatic value when the function is invoked.
  • So the default value will be assigned during the function definition itself.
  • You can find the assignment operator which is being used in the function definition.
  • You can overwrite the default values by passing your own value in the calling portion
  • The constraint here is that, the default parameter should always be the last parameter of function definition to avoid ambiguity.

You might be interested in
How can you have internet without subscribing to cable?
Svetach [21]
Sorry but you can’t there is now way
7 0
3 years ago
Which statement reflect a culture that value collectivism
Morgarella [4.7K]

Answer: To be honest i believe its D. All of the above reflect collectivism

hope this helps :)

8 0
4 years ago
Write an algorithm to find the area of a circle of radius r
Bas_tet [7]

Answer:

e=mc^2

Explanation:

4 0
2 years ago
How do you hack a iPhone, Like If you forgot your password and want to get back in your phone. What do you do?
s344n2d4d5 [400]

Answer:

fix it on itunes

Explanation:

or get a new one

6 0
3 years ago
Read 2 more answers
Print person1's kids, call the incNumKids() method, and print again, outputting text as below. End each line with a newline.
Hatshy [7]

Answer:

Hi there! This is a good question to grasp the concepts of object-oriented classes, encapsulation and abstraction of classes and their properties in Java. Please find the details below.

Explanation:

You can implement the solution by calling the getNumKids() function of the personInfo object or directly using the personKid input from the user to display the initial number of kids for the user. Then, calling the incNumKids() increases the kids count. Finally, displaying the new number of kids is done by invoking the getNumKids() method of the PersonInfo object that returns the private property of numKids to the user. The user cannot access this property without the get and set methods.

CallPersonInfo.java =====

import java.util.Scanner;

public class CallPersonInfo {

public static void main (String [] args) {

Scanner scnr = new Scanner(System.in);

PersonInfo person1 = new PersonInfo();

int personsKid;

personsKid = scnr.nextInt();

person1.setNumKids(personsKid);

System.out.println("Kids: " + personKid); // or person1.getNumKids();

   person1.incNumKids();

   System.out.println("New baby, kids now: " + personInfoObject.getNumKids());

 

}

}

You can also write the code in the same file as PersonInfo.java as below.

import java.util.Scanner;

class PersonInfo {

 private int numKids;

 public void setNumKids(int setPersonsKids) {

   numKids = setPersonsKids;

 }

 public void incNumKids() {

   numKids = numKids + 1;

 }

 public int getNumKids() {

   return numKids;

 }

 public static void main(String args[]) {

   System.out.println("Enter number of kids: ");

   Scanner scan = new Scanner(System.in);

   int num_kids = scan.nextInt();

   PersonInfo personInfoObject = new PersonInfo();

   personInfoObject.setNumKids(num_kids);

   System.out.println("Kids: " + num_kids);

   personInfoObject.incNumKids();

   System.out.println("New baby, kids now: " + personInfoObject.getNumKids());

 }

}

5 0
3 years ago
Other questions:
  • In order for an IT security framework to meet information assurance needs, the framework needs to include policies for several a
    13·1 answer
  • Is a set of standards that define how email is to be processed between mail servers is exactly the same as smtp copies an e-mail
    10·1 answer
  • Say our confusion matrix is as follows, calculate precision, recall, and accuracy. Interpret the results for the positive class.
    10·1 answer
  • Nadia has inserted an image into a Word document and now would like to resize the image to fit the document better. What is the
    6·1 answer
  • Split a string by string.
    6·1 answer
  • A palindrome is a word or a phrase that is the same when read both forward and backward. Examples are: "bob," "sees," or "never
    7·1 answer
  • Using the world_x database you installed in Module 1, list the countries and the capitals of each country. Modify your query to
    11·1 answer
  • Define E-Mail Write any 4 special features of E-Mail ​
    13·1 answer
  • Write a Python function that join the two string and print it ​
    14·2 answers
  • can people be nice and just r;p with me once im getting sad because everyone is rude about it im not a creep im really nice and
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!