Programming Languages-Java [NTA-NET (UGC-NET) Computer Science & Applications (87)]: Questions 1 - 3 of 32

Choose Programs:

⏳ 🎯 Online Tests (4 Tests [100 questions each]): NTA Pattern, Analytics & Explanations

Rs. 800.00 -OR-

3 Year Validity (Multiple Devices)

Sample TestsDetailsSee Demo

🎓 Study Material (2083 Notes): 2024-2025 Syllabus

Rs. 1250.00 -OR-

3 Year Validity (Multiple Devices)

Topic-wise Notes & SampleDetails

🎯 2699 MCQs (& PYQs) with Full Explanations (2024-2025 Exam)

Rs. 600.00 -OR-

3 Year Validity (Multiple Devices)

CoverageDetailsSample Explanation

Help me Choose & Register (Watch Video) Already Subscribed?

Question 1

Appeared in Year: 2015

Question MCQ▾

Which of the following is/are correct with reference to Abstract class and interface?

  1. A class can inherit only one Abstract class but may inherit several interfaces.
  2. An Abstract class can provide complete and default code but an interface has no code. (December)

Choices

Choice (4)Response

a.

(1) and (2) are true

b.

(2) is true

c.

(1) is true

d.

Neither (1) nor (2) is true

Edit

Question 2

Appeared in Year: 2010

Question Match List-Ⅰ List-Ⅱ▾

Match the following: (June Paper II)

List-Ⅰ (Group I)List-Ⅱ (Group II)
(A)

Garbage collection in

(i)

Generic programming

(B)

Derived class inherits from base class

(ii)

Java

(C)

Template support

(iii)

Within a statement

(D)

A forward reference

(iv)

Member function

(E)

Nameless Object

(v)

Defines a class

Choices

Choice (4)Response
  • (A)
  • (B)
  • (C)
  • (D)
  • (E)

a.

  • (iv)
  • (ii)
  • (i)
  • (iii)
  • (v)

b.

  • (iii)
  • (i)
  • (ii)
  • (iv)
  • (v)

c.

  • (v)
  • (ii)
  • (iii)
  • (iv)
  • (i)

d.

  • (ii)
  • (iv)
  • (i)
  • (v)
  • (iii)

Edit

Question 3

Appeared in Year: 2012

Question MCQ▾

Consider the program below in a hypothetical programming language which allows global variables and a choice of static or dynamic scoping

int i;

program Main ()

  1. {
  2. i =10;
  3. call f ( );
  4. }
  5. procedure f( )
  6. {
  7. int i =20;
  8. call g ( );
  9. }
  10. procedure g( )
  11. {
  12. print i;
  13. }

Let x be the value printed under static scoping and y be the value printed under dynamic scoping. Then x and y are (December Paper III)

Choices

Choice (4)Response

a.

b.

c.

d.

Both a. and b. are correct

Edit