Java英文面试题

匿名网友 匿名网友 发布于: 2015-08-30 00:00:00
阅读 141 收藏 0 点赞 0 评论 0

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 0 is on.
> Byte = 4, Bit at position 0 is off

Eg.
5 = 00000101
7      6    5    4    3    2    1    0
0    0    0    0    0    1    0    1

Bit at position 0 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

评论列表
文章目录