- 零基礎學Java第2版
- 陳潔
- 118字
- 2018-12-31 19:34:37
4.9 習題
1.用來判斷如果條件的關鍵字是______。
2. withdraw=remain>=10000?5000:500,在這段代碼中,如果remain為1100,那么withdraw會是多少?
3. switch語句可用哪些數據類型做參數?
4.以下代碼的執行結果會是什么?為什么?
int signal = 1; switch (signal) { case 1: System.out.println("紅燈"); case 2: System.out.println("綠燈"); case 3: System.out.println("黃燈"); break; default: System.out.println("默認開綠燈"); break; }
推薦閱讀
- Getting Started with Gulp(Second Edition)
- 微服務設計原理與架構
- Linux環境編程:從應用到內核
- 高級C/C++編譯技術(典藏版)
- TypeScript實戰指南
- Jupyter數據科學實戰
- ExtJS高級程序設計
- Unity 2017 Mobile Game Development
- Getting Started with Python and Raspberry Pi
- Natural Language Processing with Python Quick Start Guide
- Python 3快速入門與實戰
- Scratch編程從入門到精通
- Cloud Development andDeployment with CloudBees
- 流程讓管理更高效:流程管理全套方案制作、設計與優化
- C++教程