[OCPJP]BufferedReader 的用法
Which code fragment, when inserted at line 1, enables the code to read the GDP from the user? A. int GDP = Integer.parseInt(br.readLine()); B. int GDP = br.read(); C. int GDP = br.nextInt(); D. int G...
MagicLen · https://magiclen.org
本站也提供简体中文版。切换到简体中文版
分類
MagicLen 的主要文章,分成「科學與科技」和「社會與生活」兩大類。前者以程式設計、作業系統、網路與軟硬體的教學和心得為主,後者包含語言學習、創作、旅遊、開箱與各種生活主題,另外還有本站公告。
共 1660 篇文章
Which code fragment, when inserted at line 1, enables the code to read the GDP from the user? A. int GDP = Integer.parseInt(br.readLine()); B. int GDP = br.read(); C. int GDP = br.nextInt(); D. int G...
What is the result? A. 0 : 0 : pen B. 0 : 1 : pen C. 0 : 0 : 0 : 0 : 0 : pen D. 0 : 1 : 2 : 3 : 4 : E. A compilation error occurs.
What is the result? A. 4000.0 B. 4000 C. A compilation error occurs at line n1. D. A compilation error occurs at line n2.
You have been asked to create a ResourceBundle which uses a properties file to localize an application. Which code example specifies valid keys of menu1 and menu2 with values of File Menu and View Me...
You want to create a singleton class by using the Singleton design pattern. Which two statements enforce the singleton nature of the design? A. Make the class static. B. Make the constructor private...
Which statement is true? A. A compilation error occurs in IceCream. B. A compilation error occurs in Cake. C. A compilation error occurs in Shop. D. A compilation error occurs in Bread E. All classes...
Which code fragment creates an instance of Car? A. Car auto = Car("MyCar")::new; B. Car auto = Car::new; Car vehicle = auto::getCar("MyCar"); C. Rideable rider = Car::new; Car vehicle = rider.getCar(...
Which code fragment, when inserted at line n1, sorts the employees list in descending order of fName and then ascending order of lName? A. .sorted(Comparator.comparing(Emp::getfName).reversed().thenC...
What is the result? A. 20.0 30.0 B. 10 20 C. A compilation error occurs. D. A NumberFormatException is thrown at run time.
Which two modifications enable the code to print Open Close? A. Replace line n1 with: class Folder implements AutoCloseable { B. Replace line n1 with: class Folder extends Closeable { C. Replac...