`
woxiaoe
  • 浏览: 284513 次
  • 性别: Icon_minigender_1
  • 来自: 长沙
社区版块
存档分类
最新评论

Consider the following code: What will be printed?

    博客分类:
  • Java
阅读更多

Consider the following code: What will be printed?
public class newIntegerLong{
  public static void main(String[]args){
  Integer nA = new Integer(4096);
  Long nB = new Long(4096);
  if(nA.equals(nB))
    System.out.println("LongEqualsInteger.");
  if(nA.intValue() == nB.longValue()){
    System.out.println("If you create new primitive values of Long(4096)
    and Integer(4096), then == true.");
}}}
A. LongEqualsInteger.
B. If you create new primitive values of Long(4096) and Integer(4096),then == true.
C. LongEqualsInteger. If you create new primitive values of Long(4096)
   and Integer(4096), then == true.
D. If you create new primitive values of Long(4096) and Integer(4096),then == true.
E. Nothing will be printed.

分享到:
评论

相关推荐

    python Algorithms 2nd Edition

    Consider the following problem: You are to visit all the cities, towns, and villages of, say, Sweden and then return to your starting point. This might take a while (there are 24,978 locations to ...

    CSharp英语

    However, since the request is for IT-related knowledge points from the given information, we will focus on extracting relevant C# concepts and English vocabulary related to IT or programming. ...

    lec04-slides-fall2023-list.pdf

    * 问:what will be the output?答:Syntax Error! * 问:How many times will i be printed?答:2 * 问:How many times will sum be printed?答:1 * 问:range(1,10) => ?答:1, 2, 3, 4, 5, 6, 7, 8, 9 * 问...

    UL 796:2020-10 Printed Wiring Boards - 完整英文版(102页).pdf

    《UL 796:2020-10 Printed Wiring Boards》是美国保险商实验室(Underwriters Laboratories, UL)发布的一份关于印刷电路板安全标准的详细文档,旨在确保这些电子元件在设计、制造和使用过程中的安全性。...

    TeeChart2013_130818_SourceCode

    and online) and printed materials (the "Documentation"). 2. This EULA is a legal agreement between you and Steema. If you are acting as an agent of a company or another legal person, such as an ...

    STM32C8T6+语音识别LD3320+文字转语音SYN6288原理图及PCB全套文件

    PCB(Printed Circuit Board)设计是电子设备的核心组成部分,它负责连接和支撑所有电子元件。全套文件通常包括原理图(Schematic)和PCB布局图(Layout),原理图展示了电路的工作原理和元件间连接,而PCB布局图则...

    PCB专业用语-中英文对照.doc

    * 印制电路:printed circuit * 印制线路:printed wiring * 印制板:printed board * 印制板电路:printed circuit board (pcb) * 印制线路板:printed wiring board (pwb) 这些术语都是印制电路的基本概念,理解...

    Bayesian Network(贝叶斯网络) Python Program

    code to help with the following: (a) creating Bayes nets. There are three classes of nodes defined, and to construct a Bayes net, you can write code that calls the constructors of these classes, and ...

    2009 达内Unix学习笔记

    集合了 所有的 Unix命令大全 ...telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss ... 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ ... 命令和参数之间必需用空格隔...

    C++编程思想源代码

    will Bruce Eckel or the publisher be liable for any lost revenue, profit, or data, or for direct, indirect, special, consequential, incidental, or punitive damages, however caused and regardless ...

    linux网络管理员手册

    subject to the following conditions: 0. The copyright notice above and this permission notice must be preserved complete on a complete or partial copies. 1. Any translation or derivative work of ...

    C++编程思想第一卷源代码

    will Bruce Eckel or the publisher be liable for any lost revenue, profit, or data, or for direct, indirect, special, consequential, incidental, or punitive damages, however caused and regardless of ...

    Linux网络管理员手册

    subject to the following conditions: 0. The copyright notice above and this permission notice must be preserved complete on all complete or partial copies. 1. Any translation or derivative work of ...

    MySQL5-英文手册

    Use of this documentation is subject to the following terms: You may create a printed copy of this documentation solely for your own personal use. Conversion to other formats is allowed as long as ...

    mysql参考手册英文版

    Use of this documentation is subject to the following terms: You may create a printed copy of this documentation solely for your own personal use. Conversion to other formats is allowed as long as ...

    LuaUnicode icu-lua

    For example, you could use the following code snippet to count UTF-8 characters in a string you knew to be conforming (it will incorrectly count some invalid characters): local _, count = string....

    TeeChart2013_131216_SourceCode

    and online) and printed materials (the "Documentation"). 2. This EULA is a legal agreement between you and Steema. If you are acting as an agent of a company or another legal person, such as an ...

    The Book of PF, Second Edition.pdf

    tutorial is also the source of the following admonition, and you may be exposed to this live if you attend one of my tutorial sessions: This document is not intended as a precooked recipe for cutting...

    The Design of the Radio Frequency (RF) Subsystem Printed Circuit Boards for the Petite Amateur Navy Satellite (PANSAT)

    The Design of the Radio Frequency (RF) Subsystem Printed Circuit Boards for the Petite Amateur Navy Satellite (PANSAT)

    sd_card.zip_SD commands_The First_fatfs sd_sd card

    SD card using FAT file system This example application demonstrates reading a file system from an ... When the program is started a message will be printed to the terminal. Type ``help for command help.

Global site tag (gtag.js) - Google Analytics