Languages-Java [3i Infotech Placement]: Sample Questions 102 - 104 of 141

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 102

Edit

Describe in Detail

Essay▾

What is the protocol used by server and client?

Explanation

Java provides support for the two common network protocols:

  • TCP:
    • Transmission control protocol.
    • Allows for reliable communication between two applications.
    • TCP is typically used over the internet protocol, which is referred to as TCP/IP.
  • UDP:
    • It is user datagram protocol.
    • A connection-less protocol that allows for packets of data transmitted between applications.

Question 103

Edit

Write in Short

Short Answer▾

What is update method called?

Explanation

  • The update () method is defined by the AWT and is called when our applet has requested that a portion of its window be redrawn.
  • The problem is that the default version of update () first fills an applet with the default background colour and then calls paint () .
  • We can override the update () method.

Question 104

Edit

Write in Short

Short Answer▾

What are virtual functions?

Explanation

  • A virtual function or virtual method is a function or method whose behaviour can be override within an inheriting class using a function with the same signature.
  • Non-static functions are considered as virtual by default unless they are make private or final in java classes.
  • Concept forms an important part of the “polymorphism” in object-oriented programming.

Developed by: