`
lovnet
  • 浏览: 6724812 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
文章分类
社区版块
存档分类
最新评论

Java won't allow a simple loop such as :while (true)

 
阅读更多
Java won't allow a simple loop such as




while (true) {}




since any code following the loop will be unreachable (doh!). Java considers this an error, not a warning. (I don't agree, but they didn't ask me.) You can fool Java into doing this:




boolean flag=true;
while (flag) {}




if there is a way to break the loop, Java won't complain:




while (true) {




if (...) break;




}
分享到:
评论

相关推荐

    [Java] Java 编程面试揭秘 英文版

    t as simple as sitting down and answering questions The technical coding portion of the interview can be akin to a difficult puzzle or an interrogation With Java Programming Interviews Exposed skilled...

    Build APIs You Won't Hate

    Build APIs You Won't Hate,教你如何构建优美的API,让你的API简单易懂!

    Learn Version Control with Git: A step-by-step course for the complete

    While learning all the key features such as Branching and Merging, the book will also explain advanced topics as well as tools and services. Accompanying charts & graphics make it easy to understand ...

    apktool documentation

    Allow for a finer control over how the files are named and how they are stored. $ apktool if framework-res.apk I: Framework installed to: 1.apk // pkgId of framework-res.apk determines number (which...

    2008年6月大学英语六级A卷真题

    When a patient needed a new organ, such as a kidney, the surgeon would contact a commercial organ producer, give him the patient’s immunological profile and would then be sent a kidney with the ...

    coding in delphi 2015

    to mind – where a simple console application won’t quite illustrate things well. So this book will have some VCL applications in the demo code. I’ve actually broken down and included an entire ...

    Android代码-TagRec

    TagRec Towards A Standardized Tag Recommender Benchmarking Framework ...TagRec is part of several lists of recommender systems frameworks such as http://fmoraes.nl/se-recsys-paperswith

    where code and content meet

    Only a solid architecture can ensure that later changes to your site won’t require a large and unjustified effort. There are also other important non-functional requirements, including security, ...

    Steal This File Sharing Book: What They Won't Tell You About File Sharing

    Steal This File Sharing Book: What They Won't Tell You About File Sharing 有问题,我的QQ:571669275

    Steal This Computer Book 3: What They Won't Tell You About the Internet

    Steal This Computer Book 3: What They Won't Tell You About the Internet 有问题,我的QQ:571669275

    CE中文版-启点CE过NP中文.exe

    Disassembler/Debug: Fixed the address that is being edited when a breakpoint hits while editing an instruction Assembler: Fixed assembling reg*2/4/8+unquotedsymbol Plugin: Fixed the SDK for C plugins ...

    3D.Printing.Designs.The.Sun.Puzzle.1785888897

    you'll explore various robust sculpting methods supported by Blender that allow you to edit objects with actions such as bends or curves, similar to drawing or building up a clay structure of ...

    2012英语资料

    A:Excuse me B:I won't regret C:I'm really sorry D:That's all right 25、- I've heard that you are going to Thailand? - Yes, I'll leave on Sunday. - That's great! _______ - Thank you! A:Have a ...

    JAVA面试题汇总及参考答案

    JAVA面试题汇总及参考答案,比较经典的JAVA面试题,并附带有答案。

    西门子授权盘制作方法

    Most software companies will allow you to make a backup copy. Some don't and put copy protection on the product. A lot of protection schemes are easy to get around but the Siemens Key Disk for the S7...

    Android代码-bialjam17

    Created in under 40 hours (minus sleep) with KTX by a single Java backend developer and a cute graphics designer on a game jam organized by the Bialystok University of Technology. The jam's topic was ...

    Stripes by Example(Apress,2015)

    In this 100-page book, you will find that Stripes provides a very simple learning path, where you do not need to understand the entire framework in order to use it. The concept of this book is exactly...

    VclZip pro v3.10.1

    VCLZip supplies a default implementation of this method so for most purposes you won't need your own. - method DefaultFileNameForSplitPart - VCLZip calls this internally if you don't define your own...

    php.ini-development

    beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e.g. [Foo]) are also silently ignored, even though ; they might mean something in the future. ; ...

Global site tag (gtag.js) - Google Analytics