Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Technology has affected society and its surroundings in a number of ways. In many societies, technology has helped develop more advanced economies (including today's global economy) and has allowed the rise of a leisure class. Many technological processes produce unwanted by-products, known as pollution, and deplete natural resources, to the detriment of the Earth and its environment. Various implementations of technology influence the values of a society and new technology often raises new ethical questions. Examples include the rise of the notion of efficiency in terms of human productivity, a term originally applied only to machines, and the challenge of. | Introduction to Programming Using Java Version 6.0 June 2011 Version 6.0.1 with minor corrections July 2012 David J. Eck Hobart and William Smith Colleges This is a PDF version of an on-line book that is available at http math.hws.edu javanotes . The PDF does not include source code files solutions to exercises or answers to quizzes but it does have external links to these resources shown in blue. In addition each section has a link to the on-line version. The PDF also has internal links shown in red. These links can be used in Acrobat Reader and some other PDF reader programs. ii @1996-2012 David J. Eck David J. Eck eck@hws.edu Department of Mathematics and Computer Science Hobart and William Smith Colleges Geneva NY 14456 This book can be distributed in unmodified form for non-commercial purposes. Modified versions can be made and distributed for non-commercial purposes provided they are distributed under the same license as the original. More specifically This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license visit http creativecommons.org licenses by-nc-sa 3.0 . Other uses require permission from the author. The web site for this book is http math.hws.edu javanotes Contents Preface x 1 The Mental Landscape 1 1.1 Machine Language. 1 1.2 Asynchronous Events. 3 1.3 The Java Virtual Machine. 6 1.4 Building Blocks of Programs . 8 1.5 Object-oriented Programming. 10 1.6 The Modern User Interface . 13 1.7 The Internet and Beyond . 15 Quiz on Chapter 1 . 18 2 Names and Things 19 2.1 The Basic Java Application. 19 2.2 Variables and Types.22 2.2.1 Variables .23 2.2.2 Types and Literals . 24 2.2.3 Variables in Programs . 27 2.3 Objects and Subroutines . 28 2.3.1 Built-in Subroutines and Functions . 29 2.3.2 Operations on Strings . 33 2.3.3 Introduction to Enums . 35 2.4 Text Input and Output . 36 2.4.1 A First Text Input Example . 37 2.4.2 Text Output . 38 2.4.3 TextIO Input Functions . 39 2.4.4 .