Signup/Sign In
user profile picture

Seetharamraovanam

seetharamrao31ewl

Joined 4 years ago

Answers

All questions must be answered. Here are the Answers given by this user in the Forum.

Pass by reference is a method of passing parameters to the function which we can find in C and C++ programming languages. As java does not support the pointers explicitly we can consider that java uses Pass-by-value method to pass parameters to the function.
In Pass-by-value method of parameter passing we pass the actual value of the parameters where as In Pass-by-Reference method of parameter passing we pass the address of the variable which needs to be passed...
4 years ago
The keywords public, private and protected(also known as default*) are called as access modifiers. With the help of these access modifiers we can access to the variables which are declared inside a class and outside a method or a constructor.
*PUBLIC* : If the access modifier is public, then the variable declared with public can be accessed by any one through out the application.
*PRIVATE* : If the access modifier is private, then the variable declared with private can be accessed with in the class in which it was declared.
*PROTECTED* : If the access modifier is protected, then the variable declared with protected can be accessed with in the package only.
*NOTE* : The variables which are declared either in private or protected can be accessed by using a OOP concept called as Inheritance
4 years ago
Yeah Sure! please let me know if I can do anything
You can reach me at: seetharamvanam@gmail.com
4 years ago
Join() method in thread class is used while implementing multi-threading. The join method will allow one thread to wait until another thread completes its execution.
As you are using single thread, so there is no need to use the *join* method.
Eliminate the join method so that you will not get the error and the output for your program after removing the join method is:
m1
m2
r1
r2
4 years ago