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
quester [9]
3 years ago
7

Which of the following demonstrates the proper way to specify a variable-length argument list?

Computers and Technology
1 answer:
larisa86 [58]3 years ago
7 0

Answer:

The answer to this question is option "d".

Explanation:

In the given question option d is correct because variable-length argument is a new feature in J2SE 5.0 which stands for java 2 standard edition and 5.0 is the version name. It is the variable-length argument lists. A coder can create functions that uses a function to receive several parameter that is not specified. An argument type followed by an ellipsis(...) in the parameter list of a method means that a fixed number of arguments of that particular type is obtained by the method. and other options are not correct that can be given as:

  • In option a, we do not need to use the string the variable-length argument list. That's why it is wrong.
  • The option b and c are all wrong because in the last parameter the variable-length argument list is used.

That's why the answer to this question is the option "d".

You might be interested in
Hit and Slopes Program: A Write a program that can be used by a ski resort to keep track if local snow conditions for one week.
Llana [10]

Answer:

The java program is as follows.  

import java.lang.*;  

import java.util.Scanner;  

public class Main  

{  

//array declaration  

static int weekdays=7;  

static int[] snowfall_inch = new int[weekdays];  

static String[] snowfall_date = new String[weekdays];  

//variables to store average and maximum  

static double avg;  

static int max;  

public static void main(String[] args) {  

Scanner sc = new Scanner(System.in);  

System.out.print("Enter the month: ");  

String month = sc.next();  

for(int n=0; n<weekdays; n++)  

{  

System.out.print("\nEnter the date for day "+(n+1)+ ": ");  

snowfall_date[n] = sc.next();  

System.out.print("Enter the inches of snowfall for day "+(n+1) +": ");  

snowfall_inch[n] = sc.nextInt();  

avg = avg + snowfall_inch[n];  

}  

avg = avg/weekdays;  

System.out.printf("The average snowfall for the week is %.4f",avg);  

for(int n=0; n<weekdays-1; n++)  

{  

if(snowfall_inch[n] < snowfall_inch[n+1])  

max=snowfall_inch[n+1];  

}  

System.out.println("\nThe maximum snowfall for the week is "+max);  

}  

}  

OUTPUT  

Enter the date for day 2: 12-2-2019

Enter the inches of snowfall for day 2: 23  

Enter the date for day 3: 12-3-2019

Enter the inches of snowfall for day 3: 13  

Enter the date for day 4: 12-4-2019

Enter the inches of snowfall for day 4: 14  

Enter the date for day 5: 12-5-2019

Enter the inches of snowfall for day 5: 34  

Enter the date for day 6: 12-6-2019

Enter the inches of snowfall for day 6: 34  

Enter the date for day 7: 12-7-2019

Enter the inches of snowfall for day 7: 22

The average snowfall for the week is 21.7143  

The maximum snowfall for the week is 34  

Explanation:

1. Two arrays are declared to store dates and snowfall inches with string and integer datatypes respectively.  

2. Variables are declared to store maximum and average snowfall values with integer and double datatypes respectively.  

3. User input is taken for the month, and the dates and snowfall inch values for a week. The input is taken in for loop.  

4. Next, for loop is used to find the average and maximum snowfall of the week.  

5. These values are displayed to the user as shown in the output.

5 0
3 years ago
If I bought mine craft p.e. for 7.99 and hook my Micro soft account up, will i get java edition
katrin [286]
No, they are two diff things
5 0
1 year ago
Previous
spin [16.1K]

Answer:

A b output 0110111111001111

7 0
2 years ago
What is the missing line of code? &gt;&gt;&gt; &gt;&gt;&gt; math.sqrt(16) 4.0 &gt;&gt;&gt; math.ceil(5.20) 6
Blababa [14]

Answer:

A math.pow reference

Explanation:

3 0
2 years ago
Read 2 more answers
If 10 ft lb of torque is applied at gear A, then what is the output torque at gear D?
Mrrafil [7]
This is actually simple math.
Use the formula of Gear A/Torque > 12.8ft/lb/10 > 1.28.
Therefor the output torque is 1.28 for gear D.
6 0
3 years ago
Other questions:
  • ________ sets up a point-to-point connection between two computer systems over an Internet Protocol (IP) network. A. Point-to-Po
    15·1 answer
  • To set up a slide show you should do all of the following except ______.
    9·1 answer
  • What does this say:<br> √ans
    6·2 answers
  • A certain database has numerous tables, but they do not share any fields in common. this database will not be as powerful as oth
    15·2 answers
  • The ____________ mechanism consists of a lever arm attached to the mousetrap spring.
    15·1 answer
  • How does technology improve convenience, but impact our privacy?
    8·1 answer
  • Each computer on a network requires a unique way to identify itself and to refer to other computers. This is accomplished by usi
    8·1 answer
  • A unique ability of people which sets them far apart from animals is:
    8·1 answer
  • If you do a Find and Replace for a term, where will Word begin looking for the term?
    6·1 answer
  • _____ oversee the work of various types of computer professionals and must be able to communicate with people in technical and n
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!