`
woxiaoe
  • 浏览: 276721 次
  • 性别: 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 ...

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

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

    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 ...

    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 ...

    Why optical lithography will live forever

    held to tight tolerances, exquisitely complex patterns must be printed with high yield, and the overall cost of the process must be acceptable. Achieving acceptable chip cost using an expensive ...

    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 ...

    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 of ...

    Printed circuit board design techniques for EMC compliance

    amount of variations possible, or what the intended audience expected from a book directed toward nondegreed engineers. A thorough understanding of the concepts presented herein will assist during the...

    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 ...

    TCP IP Illustrated, Vol 1 The Protocols 2nd.pdf

    While many people consider this a tool to be used for diagnosing network problems, it is also a powerful tool for understanding how the network protocols operate, which is the goal of this book. ...

    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 ...

    PCB Emc And Printed Circuit Board Book

    PCB EMC设计 英文 PCB Emc And Printed Circuit Board Book (Mark I Montrose 着 英文扫描版

    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....

    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...

    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 ...

    EMC on Printed Circuit Board

    EMC on Printed Circuit Board

    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.

    MySQL 5.1 帮助文档 chm格式

    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 ...

Global site tag (gtag.js) - Google Analytics