试题与答案

填写完整下面程序中所缺的部分。 class myfirst { 【14】 {

题型:填空题

题目:

填写完整下面程序中所缺的部分。 class myfirst { 【14】 { System.out,println("This is my first Java Application"); } }

答案:

参考答案:public static void main(Stringargs[])

解析: public是一个表示访问权限的关键字,表示此成员函数是公有的,可以被其他类直接调用,包括Java解释器。相对应的关键字有 private、protected和friend。private表示只能被本类访问,protected表示只能被子类访问, friend是默认的访问权限,表示能被本包 (package)中任意类访问,不能被其他包中的类访问。static表示main成员函数在myfirst类的所有对象中是唯一的,因此如果本程序生成另一个myfirst类对象,调用的main函数将是同一个函数。void表示main函数没有返回值,如果有返回类型值,则可加上血或boolean等,对于有返回值的函数,其函数实体的最后应加上return语句。main函数是运行应用程序的入口点,因此编写应用程序必须有main()函数,且是唯一的。

试题推荐
题型:单项选择题

The software architecture of a program or computing system is the structure or structures of the system, which comprise software (11), the externally (12) properties of those components, and the relationships between them. The architecture is not the operational software. Rather, it is a (13) that enables a software engineer to: analyze the (14) of the design in meeting its stated requirements, consider architectural alternatives at a stage when making design changes is still relatively easy, and reduce the (15) associated with the construction of the software.

(14)处填()。

A. changeability

B. effectiveness

C. testability

D. functionality

查看答案
微信公众账号搜索答案