please give me an answer to all the following questions ASAP:
Programmering in Java
1. What does protected visibility do ? Contrast it with public and private visibility.
2. What is the difference between instance methods and class methods ?
3. Explain why constructors are useful. Give a short example.
4. What is a local variable ? (i.e., local to a method)
Give an example of a method containing a local variable and show its scope.
5. Assume that:
char c = ´A´;
String s = "programmering";
What are the values of the following expressions ?
´a´ <= c
[url removed, login to view]("Programmering ")
[url removed, login to view]("PROGRAMMERING")
[url removed, login to view]("Programmering ") > 0
6. Let x be any integer.
a) Is the expression ( x > 3 ) | | ! ( x < 3 ) equivalent to ( x > 3 ) ?
b) Is the expression ( 2 < x ) && ( x < 10 ) equivalent to ! ( x <= 2 | | x >= 10 ) ?
The above expressions are equivalent if they evaluate to the same value for every possible
value of x.
7. Explain the difference between statement1 and statement2. For each, what is the output if
the initial value of x is 0 ?
if ( x >= 0 ) if ( x >= 0 )
x = x + 1; x = x + 1;
else if ( x >= 2 ) if ( x >= 2 )
x = x + 2; x = x + 2;
[url removed, login to view](x); [url removed, login to view](x);
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).