Q 1. Construct a Java program to do the following
(if you do this question, you do not have to answer Q2, Q3 and Q4):
byte b =
byte pos = ;
bu.IsBitOn(b, pos);
b = 4;
bu.IsBitOn(b, pos);
Result:
> Byte = 5, Bit at position is on.
> Byte = 4, Bit at position is off
Eg.
5 = 11
7 6 5 4 3 2 1
1 1
Bit at position is on
Q 2. Explain why Java program can be easily run on different platforms/operating systems.
Q 3. Describe the structure of a Class in Java
Q 4. Explain Inheritance and Overloaded Function in Java