问题 单项选择题

下列哪个修饰符可以使在一个类中定义的成员变量只能被同一包中的类访问

A.private

B.无修饰符

C.public

D.protected

答案

参考答案:B

解析:其中public变量可以被所有的外部类访问,而pretected的可以被 同一个包及该类的子类访问,没有任何修饰符的变量可以被同一个包中的类访问,而 private变量只能在被该类内部被访问。

默写题
完形填空

.

第二节:完形填空(共20小题,每小题1.5分,满分30分)

阅读下面短文,掌握其大意,然后从36~55各题所给的四个选项(A、B、C和D)中,选出最佳选项,并在答题卡上将该项涂黑。

Throughout history,people have been the victims of pickpockets.Today,  36  is one of the most rapidly increasing  37 .Pickpockets are increasing   38  and developing better methods to practice their skill.  39  one million Americans lose money to pickpockets every year.No one is really safe  40   a skilled pickpocket.His victims,or “marks” 41  they are rolled,can be rich or poor,young or old.  42 the 18th century,pickpockets   43  in England.Large crowds of people would gather to watch the hanging  44  was supposed to be a warning to other pickpockets.  45 ,in time the practice was discontinued.

Police officials say that most   46  pickpockets come from South America. 47 these expert pickpockets  48   in special schools called Jingle Bell School.A pickpocket graduates from a J.B. 49 he is able to steal a wallet from a dressed dummy that has  50 inside its pockets!

Some of the  51  places of pickpockets are banks,airports,supermarkets,trains and bus stations.  52  a pickpocket will work with another pickpocket  53  his partner.  54  being the victim of a pickpocket,it is   55  to be very careful when in the midst of large gatherings of people.

36.A.pick pocketing B.stealing pickpockets    C.to pickpocket D.to steal pickpockets

37.A.headaches           B.faults              C.mistakes                 D.crimes

38.A.by far                 B.at random       C.in number              D.out of order

39.A.Automatically     B.Obviously        C.Approximately       D.Subsequently

40.A.against               B.with               C.out of                    D.from

41.A.since                  B.as                   C.so                          D.thus

42.A.At                      B.Since              C.From                     D.During

43.A.were hanged       B.would hang        C.were hung              D.must be hung

44.A.what                  B.of which         C.which                    D.among whom

45.A.Therefore           B.At once          C.Because                 D.However

46.A.attractive            B.convenient       C.efficient                 D.serious

47.A.Much of             B.A large amount of   C.Many of                 D.A great number

48.A.are researched     B.specialize            C.are trained              D.major

49.A.where                 B.when                  C.although                D.however

50.A.money                B.jewelry               C.bells                      D.rings

51.A.favorite              B.liking                 C.favored                  D.be liked

52.A.Seldom              B.Once                  C.Often                     D.Forever

53.A.like                    B.being                  C.for                        D.as

54.A.To avoid             B.To neglect           C.Trying not              D.To forget

55.A.critical               B.fortunately          C.important               D.obvious