1) Inside a class, this can be used to

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter9: Records (struct)
Section: Chapter Questions
Problem 12SA
icon
Related questions
Question

Need java help.

 

1) Inside a class, this can be used to

a) call a constructor from within the body of any function

b) call a constructor from within the body of another constructor

c) initialize the super class

d) initialize the methods of the class

e) print the contents of class

 

2) 

Which one of the following Java statements allocates an array a of type T[] where T is a generic? Assume capacity is an integer.

 

a) a=new T[capacity];

b) a=new Object[capacity];

c) a=new (T[]) Object[capacity];

d) a=(T[]) new Object[capacity];

e) None of the above

Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning