首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序的执行结果是( )。 public class Test { public static void main(String args[]) { byte y=4; lon
下列程序的执行结果是( )。 public class Test { public static void main(String args[]) { byte y=4; lon
admin
2010-07-28
22
问题
下列程序的执行结果是( )。 public class Test { public static void main(String args[]) { byte y=4; long r=80L; System.out.println(r/y); } }
选项
A、20B
B、20
C、20
D、编译错误
答案
2
解析
在定义long型数的时候,类似long r=80L,在数字后面加上L,当然大小写都可以,在计算机要求显示或输出时,是看不到L的;还需注意,long型占64bit,远比byte的优先级高,所以r/y的结果是long型的。
转载请注明原文地址:https://kaotiyun.com/show/Jh9p777K
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
在结构化设计方法中,生成的结构图(S.C)中,带有箭头的连线表示
下列数据结构中。属于非线性结构的是
软件开发离不开系统环境资源的支持,其中必要的测试数据属于
对建立良好的程序设计风格,下面描述正确的是
设一棵二叉树中有3个叶子结点,有8个度为1的结点,则该二叉树中总的结点数为
下列叙述中正确的是
支持子程序调用的数据结构是
数据库管理系统中负责数据模式定义的语言是()。
数据库管理系统中负责数据模式定义的语言是
随机试题
Charcot五联症会出现在
成人牙周炎的临床特点为
下列选项中,不能引起促胃液素分泌的是
下列哪一案件,法院可以调解结案?()
直接为了获取内部控制设计或运行的有效性的证据的审计程序被称为()。
下列关于GT的说法正确的是()。
我国基层民主自治的最大特点是()
字符比较大小实际是比较它们的ASCII码值,下列正确的比较是
Afterhergraduationfrommiddleschool,shedecidedto______hereducationinPads.
Itbadbeenapleasantlywarmdaywithoutmuchwind,andwithenoughcloudtopreventtheheatofthesunbecomingtoogreat.Ch
最新回复
(
0
)