Loading [MathJax]/jax/output/CommonHTML/config.js
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >java练习本(2019-07-25)

java练习本(2019-07-25)

作者头像
微笑的小小刀
发布于 2019-07-30 03:41:01
发布于 2019-07-30 03:41:01
31000
代码可运行
举报
文章被收录于专栏:java技术大本营java技术大本营
运行总次数:0
代码可运行

昨日翻译

昨日翻译

“ I have a wonderful network of friends and feel blessed to be surrounded by so many people I love.”

—— Linda Evans

“我在一个很好的朋友网络,能被这么多我爱的人包围,我感到很幸运。”

——琳达 埃文斯

今日名言

“True love comes quietly, without banners or flashing lights. If you hear bells, get your ears checked.”

—— Erich Segal

2019.07.23问题及解析

题目

下面赋值语句中正确的是?

A.Double double = 3;

B.int i = 0.0;

C.double d = 4.3e30

D.float f = 4.5

答案与解析

1.相关知识

java数据进行赋值时,如果不能正确的赋值将会无法通过编译

比如int类型不能直接赋予double型的数据

byte<short<int<long<float<double小的数据类型不可直接赋值

2.答案解析

A.double为关键字不能使用,且3为整型无法直接赋值给Double封装类型,错误

B.0.0为double类型,无法赋值给整型变量i,错误

C.double的取值范围为-1.7E-308~1.7E+308,正确

D.4.5为double类型,无法直接赋值给float类型,错误

答案选C

2019.07.25问题

题目分类

继承——有参构造

题目
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
public class Test extends Father{
   public Test(String s){
       System.out.print("T");
  }
   public static void main(String[] args) {
       new Test("M");
  }
}

class Father{
   public Father(String s){
       System.out.print("F");
  }
}

上述程序输出的结果为?

A.FT

B.TF

C.M

D.编译错误

重磅推荐

以我手写我心,有位伟人说过,

整理记录是最高效的学习方法

在这里即可一展所学,

不仅可以与同辈交流

还可与前辈过招

END

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2019-07-25,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 java技术大本营 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
java练习本(2019-07-23)
“ To love and win is the best thing. To love and lose, the next best.”
微笑的小小刀
2019/07/24
2850
java练习本(2019-07-27)
“True love comes quietly, without banners or flashing lights. If you hear bells, get your ears checked.”
微笑的小小刀
2019/07/30
2840
java练习本(2019-07-20)
“We are all born for love. It is the principle of existence, and its only end. ”
微笑的小小刀
2019/07/22
3030
java练习本(2019-07-19)
“Never pretend to a love which you do not actually feel, for love is not ours to command.”
微笑的小小刀
2019/07/22
3390
java练习本(2019-07-19)
java练习本(2019-07-10)
“ Love is our true destiny. We do not find the meaning Of life by ourselves alone- We find it with another. ”
微笑的小小刀
2019/07/15
2610
java练习本(2019-07-21)
“ Love is the greatest refreshment in life. ”
微笑的小小刀
2019/07/24
2530
java练习本(2019-07-21)
java练习本(2019-08-14)
“Those that go searching for love, only manifest their own lovelessness. And the loveless never find love, only the loving find love. And they never have to seek for it.”
微笑的小小刀
2019/08/16
3140
java练习本(2019-07-16)
“ I'd like to run away from you. But if you didn't come and find me...I would die.”
微笑的小小刀
2019/07/17
3000
java练习本(2019-07-22)
“ Love is the only force capable of transforming an enemy into friend. ”
微笑的小小刀
2019/07/24
3220
java练习本(2019-07-22)
java练习本(2019-06-14)
“Life is not a problem to be solved, but a reality to be experienced.”
微笑的小小刀
2019/06/19
3100
java每日一练(19_04_08)|运算符、循环—— for、++自增
“When I dare to be powerful – to use my strength in the service of my vision, then it becomes less and less important whether I am afraid.” ——Audre Lorde
微笑的小小刀
2019/05/31
8710
java练习本(2019-07-17)
“ I love thee, I love but thee With a love that shall not die Till the sun grows cold And the stars grow old. ”
微笑的小小刀
2019/07/22
2730
java练习本(2019-07-17)
java练习本(2019-07-18)
“Love is like war, easy to begin but hard to end. ”
微笑的小小刀
2019/07/22
3780
java练习本(2019-07-18)
java练习本(2019-06-03)
“We are what we repeatedly do; excellence, then, is not an act but a habit.”
微笑的小小刀
2019/06/03
3310
java练习本(原每日一练)(2019-04-18)
“Love yourself first and everything else falls into line. You really have to love yourself to get anything done in this world.”
微笑的小小刀
2019/06/02
5190
java练习本(2019-07-12)
“ Love is our true destiny. We do not find the meaning Of life by ourselves alone- We find it with another.”
微笑的小小刀
2019/07/17
3100
java练习本(2019-07-29)
“The best and most beautiful things in this world cannot be seen or even heard, but must be felt with the heart.”
微笑的小小刀
2019/07/30
3190
java练习本(2019-07-13)
昨日翻译 “ The most I can do for my friend is simply to be his friend. I have no wealth to bestow on him
微笑的小小刀
2019/07/17
2360
java基本数据类型, byte: short: int: long: float: double: float和double有什么区别 boolean: char:
float的表达式为1bit(符号位)回+8bits(指数位)+23bits(尾数位)
zhangjiqun
2024/12/16
4450
java练习本(2019-06-24)
“The dream crossed twilight between birth and dying.”
微笑的小小刀
2019/06/28
3050
相关推荐
java练习本(2019-07-23)
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档