how to create thread in java?

Answer Posted / bijoy

Their are specifically two different approaches to create
threads in Java:
1.By Extending thread class.
2.By Implementing runnable interface.

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what type of questions

1917


What is object and class in oops?

816


What are the three main types of variables?

850


What is super in oop?

878


What is a superclass in oop?

936


Why is abstraction used?

865


What is the types of inheritance?

840


What is the significance of classes in oop?

835


What is new keyword in oops?

816


How do you achieve polymorphism?

847


What is overriding vs overloading?

813


What is the point of polymorphism?

799


This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.

1891


what is graphics

2232


What is an example of genetic polymorphism?

902