Question

12 - Which of the following does not indicate a javadocs comment? I. // II. /*...

12 - Which of the following does not indicate a javadocs comment?

I. //
II. /*
III. /**

Question 12 options:

1)

Statement I only.

2)

Statement II only.

3)

Statement III only.

4)

Statements I and II only.

5)

Statements I and III only.

13 - Assume that the following numbers belonged to an ArrayList called values.

5, 23, 45, -3, 17, 18, 100

Which of the following would determine how many elements are in values?

Question 13 options:

1)

int numElements = values.length;

2)

int numElements = values.length();

3)

int numElements = values.size();

4)

int numElements = values.size;

5)

double numElements = values.size;

14 - Which of the following are not valid overloaded methods?

I. public void someMethod(int number1)

public void someMethod(String number3)
public int someMethod(int number2)

II. public int someMethod(int number1)
public double someMethod()
public String someMethod(String number3)

III. public void someMethod()
public double someMethod(double number1)
public double someMethod()

Question 14 options:

1)

Statement I only.

2)

Statement II only.

3)

Statement III only.

4)

Statements I and III only.

5)

Statements II and III only.

15 - Which of the following correctly declares an ArrayList? (

I. ArrayList list = new ArrayList();
II. ArrayList list = new ArrayList(10);
III. ArrayList = new ArrayList(10);

Question 15 options:

1)

Statement I only.

2)

Statement II only.

3)

Statement III only.

4)

Statements I and II only.

5)

Statements II and III only.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

12 - Which of the following does not indicate a javadocs comment?

Ans) 4) Statements I and II only.

==================================

13 - Assume that the following numbers belonged to an ArrayList called values.

5, 23, 45, -3, 17, 18, 100

Which of the following would determine how many elements are in values?

Ans) 3)  int numElements = values.size();

=================================

14)   Which of the following are not valid overloaded methods?

Ans) 4) Statements I and III only.

================================

15) Which of the following correctly declares an ArrayList?

Ans) 4) Statements I and II only.

=====================Could you plz rate me well.Thank You

Add a comment
Know the answer?
Add Answer to:
12 - Which of the following does not indicate a javadocs comment? I. // II. /*...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In the following code, it gets hung up at    cout << "Number1 * Number2 =...

    In the following code, it gets hung up at    cout << "Number1 * Number2 = " << number1 * number2 << endl; giving an error of "no math for operator<<" what am i doing wrong? Thank you #include <iostream> #include <cctype> #include <cstdlib> using namespace std; class Rational //class for rational numbers (1/2, 5/9, ect..) {    public:        Rational(int numerator, int denominator);        Rational(int numberator);        Rational(); //default        friend istream& operator >>(istream& ins,...

  • Debug the following java code so that it will have given out put at the bottom....

    Debug the following java code so that it will have given out put at the bottom. Make sure to fix all syntax and logical errors. import java.util.Scanner; public class Graphs { // draws 5 histograms public void drawHistograms() Scanner input = new Scanner( System.in ); int number1 = 0; // first number int number2 = 0; // second number int number3 = 0; // third number int number4 = 0; // fourth number int number5 = 0; // fifth number...

  • Consider the following classes: Dollhouse, Legos, TeddyBear, Toy, ToyBox Which should not be included in a...

    Consider the following classes: Dollhouse, Legos, TeddyBear, Toy, ToyBox Which should not be included in a class hierarchy?    ToyBox     Dollhouse     TeddyBear     Legos     Toy __________________ Questions 6 - 9 Refer to the following code: public class WhatsIt { private int[] values; private double average; public WhatsIt () { values = new int[10]; findAvg(); } public WhatsIt (int[] n) { values = n; findAvg(); } public void findAvg () { double sum = 0; for (int i...

  • Below are the Car class and Dealership class that I created In the previous lab import...

    Below are the Car class and Dealership class that I created In the previous lab import java.util.ArrayList; class Car { private String make; private String model; private int year; private double transmission; private int seats; private int maxSpeed; private int wheels; private String type; public Car() { } public Car(String make, String model, int year, double transmission, int seats, int maxSpeed, int wheels, String type) { this.make = make; this.model = model; this.year = year; this.transmission = transmission; this.seats =...

  • I’m giving you code for a Class called GenericArray, which is an array that takes a...

    I’m giving you code for a Class called GenericArray, which is an array that takes a generic object type. As usual this is a C# program, make a new console application, and for now you can stick all of this in one big file. And a program that will do some basic stuff with it Generic Array List What I want you to do today: Create methods for the GenericArray, Easy(ish): public void Append (T, value) { // this should...

  • How to solve and code the following requirements (below) using the JAVA program? 1. Modify the...

    How to solve and code the following requirements (below) using the JAVA program? 1. Modify the FoodProduct Class to implement Edible, add the @Overrride before any methods that were there (get/set methods) that are also in the Edible interface. 2. Modify the CleaningProduct Class to implement Chemical, add the @Overrride before any methods that were there (get/set methods) that are also in the Chemical interface. 3. Create main class to read products from a file, instantiate them, load them into...

  • Can someone help me with my code.. I cant get an output. It says I do...

    Can someone help me with my code.. I cant get an output. It says I do not have a main method. HELP PLEASE. The instruction are in bold on the bottom of the code. package SteppingStones; //Denisse.Carbo import java.util.Scanner; import java.util.ArrayList; import java.util.List; public class SteppingStone5_Recipe { private String recipeName; private int servings; private List<String> recipeIngredients; private double totalRecipeCalories; public String getRecipeName() { return recipeName; } public void setRecipeName (string recipeName){ this.recipeName = recipeName; } public int getServings() { return...

  • I need a java flowchart for the following code: import java.util.*; public class Main {   ...

    I need a java flowchart for the following code: import java.util.*; public class Main {    public static void main(String[] args) {    Scanner sc=new Scanner(System.in);           System.out.print("Enter the input size: ");        int n=sc.nextInt();        int arr[]=new int[n];        System.out.print("Enter the sequence: ");        for(int i=0;i<n;i++)        arr[i]=sc.nextInt();        if(isConsecutiveFour(arr))        {        System.out.print("yes the array contain consecutive number:");        for(int i=0;i<n;i++)        System.out.print(arr[i]+" ");       ...

  • How to build Java test class? I am supposed to create both a recipe class, and...

    How to build Java test class? I am supposed to create both a recipe class, and then a class tester to test the recipe class. Below is what I have for the recipe class, but I have no idea what/or how I am supposed to go about creating the test class. Am I supposed to somehow call the recipe class within the test class? if so, how? Thanks in advance! This is my recipe class: package steppingstone5_recipe; /** * *...

  • Java Questions When creating a for loop, which statement will correctly initialize more than one variable?...

    Java Questions When creating a for loop, which statement will correctly initialize more than one variable? a. for a=1, b=2 c. for(a=1, b=2) b. for(a=1; b=2) d. for(a = 1&& b = 2) A method employee() is returning a double value. Which of the following is the correct way of defining this method? public double employee()                                    c. public int employee() public double employee(int t)                  d. public void employee() The ____ statement is useful when you need to test a...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT