Languages-Java [3i Infotech Placement]: Sample Questions 71 - 72 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 71

Edit

Write in Short

Short Answer▾

What is the difference between Grid and Gridbaglayout?

Explanation

Difference between Grid and Gridbaglayout
Grid LayoutGridbag Layout
Fixed size layout for each component.We can specify the size of each component.
It is not adjustable size layoutIt is an adjustable size layout.
Class lays all components in rectangular grid like structure of container.Class a flexible layout manager that components vertically and horizontally.

Question 72

Edit

Describe in Detail

Essay▾

What is thread?

Explanation

Understanding of Thread Process
  • A thread is a single sequential flow of control within a program- that is the path of executing a program (through control statements) .
  • Java programs have least one main thread created by the java virtual machine (JVM) at the program՚s start. This thread calls the main () method.
  • Creating a thread is accomplished by implementing an interface and extending a class.
  • Multi-threaded applications allow multiple thread execution simultaneously.
  • A single-threaded application executes only one thread at a time- for example a single- threaded application may allow only typing of words.

Developed by: