[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-347082-105":59,"doc-detail-347082-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","introduction-to-programming-using-java-version-70-programming-basics","Introduction to Programming Using Java - Version 7.0 - Programming basics","","Introduction to Programming Using Java is a free online book in PDF form, authored by David J. Eck. The Version 7.0 release (with later minor corrections) presents a structured introduction to programming concepts using the Java language, covering topics from machine language foundations and the Java Virtual Machine to objects, strings, input/output, expressions, and control flow. The contents include quizzes and exercises by chapter, alongside references to external resources available through links in the PDF.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/introduction-to-programming-using-java-version-70-programming-basics/347082/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/introduction-to-programming-using-java-version-70-programming-basics/347082.png","ImageObject",300,407,{"name":92,"@type":93},"นรินทร์","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-28","2026-09-22",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",13,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What does the book focus on in learning Java programming?","Question",{"text":113,"@type":114},"It guides readers through core programming ideas using Java, beginning with foundational concepts and progressing through objects, expressions, input/output, and control structures.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How is the PDF version organized for study?",{"text":118,"@type":114},"The table of contents shows chapters that include quizzes and exercises, supporting step-by-step learning progression across topics.",{"name":120,"@type":111,"acceptedAnswer":121},"Does the PDF include source code, solutions, or quiz answers?",{"text":122,"@type":114},"The PDF does not include source code files, solutions to exercises, or answers to quizzes, but it provides external links to those resources.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},347082,1790437114,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":140,"language":141,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":67,"update_tm":145,"read_time":146,"preview_page_count":26,"preview_urls":147},2336475104957,"https://ap-avatar.wpscdn.com/avatar/22000c4c6bd8a5076e1?x-image-process=image/resize,m_fixed,w_180,h_180&k=1787554080175789136","Introduction to Programming Using Java  \nVersion 7.0, August 2014  \n(Version 7.0.3, with just a few corrections, May 2018)  \nDavid J. Eck  \nHobart and William Smith Colleges  \nThis is a PDF version of a free on-line book that is available at [http://math.hws.edu/javanotes/](http://math.hws.edu/javanotes/. The PDF does)[. The PDF does](http://math.hws.edu/javanotes/. The PDF does) not include source code 􀀌les, solutions to exercises, or answers to quizzes, but it does have external links to these resources, shown in blue.  \nThe PDF also has internal links, shown in red. These links can be used in Acrobat Reader and some other PDF reader programs.  \nii  \n􀀍c1996–2018, David J. Eck  \nDavid J. Eck ([eck@hws.edu](eck@hws.edu))  \nDepartment of Mathematics and Computer Science Hobart and William Smith Colleges  \nGeneva, NY 14456  \nThis book can be distributed in unmodi􀀌ed form for non-commercial purposes. Modi􀀌ed versions can be made and distributed for non-commercial purposes provided they are distributed under the same license as the original. More speci􀀌cally: This work is licensed under the Creative Commons AttributionNonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit [http://creativecommons.org/licenses/by-nc-sa/3.0/. Other](http://creativecommons.org/licenses/by-nc-sa/3.0/. Other) uses require permission from the author.  \nThe web site for this book is: [http://math.hws.edu/javanotes](http://math.hws.edu/javanotes)  \nContents  \nPreface xi  \n1 The Mental Landscape 1  \n1.1 Machine Language ................................... 1  \n1.2 Asynchronous Events .................................. 3  \n1.3 The Java Virtual Machine ............................... 6  \n1.4 Building Blocks of Programs ............................. 8  \n1.5 Object-oriented Programming ............................. 10  \n1.6 The Modern User Interface .............................. 13  \n1.7 The Internet and Beyond ............................... 15  \nQuiz on Chapter 1 ...................................... 18  \n2 Names and Things 19  \n2.1 The Basic Java Application .............................. 19  \n2.2 Variables and Types .................................. 23  \n2.2.1 Variables .................................... 23  \n2.2.2 Types ...................................... 25  \n2.2.3 Literals ..................................... 26  \n2.2.4 Strings and String Literals ........................... 27  \n2.2.5 Variables in Programs ............................. 28  \n2.3 Objects and Subroutines ................................ 29  \n2.3.1 Built-in Subroutines and Functions ...................... 30  \n2.3.2 Classes and Objects .............................. 33  \n2.3.3 Operations on Strings ............................. 34  \n2.3.4 Introduction to Enums ............................. 36  \n2.4 Text Input and Output ................................ 37  \n2.4.1 Basic Output and Formatted Output ..................... 38  \n2.4.2 A First Text Input Example .......................... 39  \n2.4.3 Basic TextIO Input Functions ......................... 41  \n2.4.4 Introduction to File I/O ............................ 43  \n2.4.5 Other TextIO Features ............................. 45  \n2.4.6 Using Scanner for Input ............................ 46  \n2.5 Details of Expressions ................................. 47  \n2.5.1 Arithmetic Operators ............................. 48  \n2.5.2 Increment and Decrement ........................... 49  \n2.5.3 Relational Operators .............................. 50  \n2.5.4 Boolean Operators ............................... 50  \n2.5.5 Conditional Operator ............................. 51  \nCONTENTS ii  \n2.5.6 Assignment Operators and Type Conversion ................ 51  \n2.5.7 Precedence Rules ................................ 53  \n2.6 Programming Environments .............................. 54  \n2.6.1 Java Development Kit ............................. 54  \n2.6.2 Command Line Environment ......................... 55  \n2.6.3 Eclipse ............","cbCaie1QIvUqigp7","https://ap.wps.com/l/cbCaie1QIvUqigp7","pdf",6426915,755,"English","# Preface\n# The Mental Landscape\n## Machine Language\n## Asynchronous Events\n## The Java Virtual Machine\n## Building Blocks of Programs\n## Object-oriented Programming\n## The Modern User Interface\n## The Internet and Beyond\n# Names and Things\n## The Basic Java Application\n## Variables and Types\n## Objects and Subroutines\n## Text Input and Output\n## Details of Expressions\n## Programming Environments\n# Control\n## Blocks, Loops, and Branches\n## Algorithm Development\n## while and do..while\n## The for Statement\n## The if Statement\n## The switch Statement","[{\"question\":\"What does the book focus on in learning Java programming?\",\"answer\":\"It guides readers through core programming ideas using Java, beginning with foundational concepts and progressing through objects, expressions, input/output, and control structures.\"},{\"question\":\"How is the PDF version organized for study?\",\"answer\":\"The table of contents shows chapters that include quizzes and exercises, supporting step-by-step learning progression across topics.\"},{\"question\":\"Does the PDF include source code, solutions, or quiz answers?\",\"answer\":\"The PDF does not include source code files, solutions to exercises, or answers to quizzes, but it provides external links to those resources.\"}]","Introduction to Programming Using Java - Version 7.0 - Programming basics | PDF",1790065183,1903,[148,152,156,160,164,168,172,176,180,184,188,193,198,202,207,212,217,222,227,231,235,240,245,250,255,260,265,270,275,280,284,289,294,299,304,309,314,319,324,329,333,338,343,348,353,358,363,368,373,378,382,387,392,397,402,407,412,417,422,427],{"page_no":8,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/f6dd1fc12198371b2e8e92de84c5a04d.webp",983,1272,{"page_no":14,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/e80641a0f88eba07cc2a9b8f6ddec6ae.webp",982,1270,{"page_no":81,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/e0a4f1d903ee568a6690f0ed1b3a0624.webp",981,1269,{"page_no":19,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/ed33cf47e26f3013f7157280cd02f4e6.webp",980,1268,{"page_no":24,"url":165,"width":166,"height":167},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/dbcbc070b113e2e3cd4ab32c0ad0e1d7.webp",979,1267,{"page_no":29,"url":169,"width":170,"height":171},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/6d656eaa2edf79170ca0d3ecb9f508bc.webp",978,1265,{"page_no":34,"url":173,"width":174,"height":175},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/43ca3daed7608bb5812721d79ca86f8e.webp",977,1264,{"page_no":39,"url":177,"width":178,"height":179},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/8410ff89ff9d5e21309fd2bebe103a33.webp",976,1263,{"page_no":44,"url":181,"width":182,"height":183},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/ad60755e38a64fb38a7a669a4155cab3.webp",975,1261,{"page_no":52,"url":185,"width":186,"height":187},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/a11189b5d27fa8bd97779a842f46cda3.webp",974,1260,{"page_no":189,"url":190,"width":191,"height":192},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/70fce063187697d307c5724b7598d8d9.webp",973,1259,{"page_no":194,"url":195,"width":196,"height":197},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/2d33d024830d3de375188b38da70c762.webp",972,1257,{"page_no":105,"url":199,"width":200,"height":201},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/e25d4e2b26e97c011acc596e100d0416.webp",971,1256,{"page_no":203,"url":204,"width":205,"height":206},14,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/b220146eae3928be8d8be6102a21dcc6.webp",970,1255,{"page_no":208,"url":209,"width":210,"height":211},15,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/1356a28b1aa62e9a96ee79b7263a9d28.webp",969,1254,{"page_no":213,"url":214,"width":215,"height":216},16,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/4595f56072fc0a7d4ec2431f36e204fa.webp",968,1252,{"page_no":218,"url":219,"width":220,"height":221},17,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/e3575302004bde2a9b55942be4a32e3d.webp",967,1251,{"page_no":223,"url":224,"width":225,"height":226},18,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/1530c9dd670d4f505146f2dd647d7463.webp",966,1250,{"page_no":56,"url":228,"width":229,"height":230},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/49217e3a8ecaf09da7bb6414a04614ac.webp",965,1248,{"page_no":46,"url":232,"width":233,"height":234},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/184fdcb634c2d818cf1468d2b4965059.webp",964,1247,{"page_no":236,"url":237,"width":238,"height":239},21,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/d9504d50cf740ca4c0692cfc76e4140d.webp",963,1246,{"page_no":241,"url":242,"width":243,"height":244},22,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/48c6df59c068b7865b8d4d6da312bd3e.webp",962,1245,{"page_no":246,"url":247,"width":248,"height":249},23,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/3fd894d84ee9fece8212136ef45cc5e4.webp",961,1243,{"page_no":251,"url":252,"width":253,"height":254},24,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/6d1832975b65aedfb548c6d83e4ac454.webp",960,1242,{"page_no":256,"url":257,"width":258,"height":259},25,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/ae31faf599768f3e138f7b7c77fc24cb.webp",959,1241,{"page_no":261,"url":262,"width":263,"height":264},26,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/471b656e7702682af955e100968091b1.webp",958,1239,{"page_no":266,"url":267,"width":268,"height":269},27,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/6464a26126972daedc42052fdfa3e0f7.webp",957,1238,{"page_no":271,"url":272,"width":273,"height":274},28,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/24e765d51ee8e61f35b701d80cb6d9e6.webp",956,1237,{"page_no":276,"url":277,"width":278,"height":279},29,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/6492b6cdd6f71ed721d2f82e9524632b.webp",955,1235,{"page_no":41,"url":281,"width":282,"height":283},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/3ed8c21a609587e7ed11dc110f8fd4f0.webp",954,1234,{"page_no":285,"url":286,"width":287,"height":288},31,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/72e518b08a8a29b7c680ba7d9fca2e27.webp",953,1233,{"page_no":290,"url":291,"width":292,"height":293},32,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/0ee97738ec1ffaa47d38f7d9410db47d.webp",952,1232,{"page_no":295,"url":296,"width":297,"height":298},33,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/5618d664e89bfd11ab7caff0ba8e49c3.webp",951,1230,{"page_no":300,"url":301,"width":302,"height":303},34,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/74ccf4d1463e4f5c1275ad01540b5dd0.webp",950,1229,{"page_no":305,"url":306,"width":307,"height":308},35,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/0dde5bc635801ce5b98f3d022ab0fe33.webp",949,1228,{"page_no":310,"url":311,"width":312,"height":313},36,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/ca195970ca0d02c0605751546af38c8a.webp",948,1226,{"page_no":315,"url":316,"width":317,"height":318},37,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/872eb3b888da2629a1ec46c0dfb30d4c.webp",947,1225,{"page_no":320,"url":321,"width":322,"height":323},38,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/7e7a145d19ce6e5fd9b71e4e00b4b399.webp",946,1224,{"page_no":325,"url":326,"width":327,"height":328},39,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/6e1b0d1de4fbb0b82b4ec1b034c9b66a.webp",945,1223,{"page_no":36,"url":330,"width":331,"height":332},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/04aa27d77f4620c22ebce8018bdaaf23.webp",944,1221,{"page_no":334,"url":335,"width":336,"height":337},41,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/55d5e4adda0a22b4b2f9b16e80ba6333.webp",943,1220,{"page_no":339,"url":340,"width":341,"height":342},42,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/57594f47561d2597a5b2ec4d8f2a30fe.webp",942,1219,{"page_no":344,"url":345,"width":346,"height":347},43,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/1aec7c326f7f4a1004eb2e35f3801783.webp",941,1217,{"page_no":349,"url":350,"width":351,"height":352},44,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/e83ccd5ee8bb3d1cbb95032f1e1769aa.webp",940,1216,{"page_no":354,"url":355,"width":356,"height":357},45,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/3f5669bb9a0410b4998991179e3adc63.webp",939,1215,{"page_no":359,"url":360,"width":361,"height":362},46,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/383dea92541cfb82fd71cfca0512f52f.webp",938,1213,{"page_no":364,"url":365,"width":366,"height":367},47,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/3a6478fa6319e1a56b6e321b5264623b.webp",937,1212,{"page_no":369,"url":370,"width":371,"height":372},48,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/532522dee7be5c4973c6328ca8d5a7f3.webp",936,1211,{"page_no":374,"url":375,"width":376,"height":377},49,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/8572facf6bad90115e8eb31a42960759.webp",935,1210,{"page_no":31,"url":379,"width":380,"height":381},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/fbc6171aad2ef40f83245b21eea5e3db.webp",934,1208,{"page_no":383,"url":384,"width":385,"height":386},51,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/257ddb7f0d454e198de3db67a1db6b23.webp",933,1207,{"page_no":388,"url":389,"width":390,"height":391},52,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/e1ecbe33188c3bf6daab7c85ea2a1679.webp",932,1206,{"page_no":393,"url":394,"width":395,"height":396},53,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/553d4ebaa3815e156bc3a3fb893a0ebb.webp",931,1204,{"page_no":398,"url":399,"width":400,"height":401},54,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/26483c0ba0f701a35d9518ffc047b03e.webp",930,1203,{"page_no":403,"url":404,"width":405,"height":406},55,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/d14c42e588d0e2eeb5cb1314f939be3d.webp",929,1202,{"page_no":408,"url":409,"width":410,"height":411},56,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/19ceea0773588184143dc4310419a8ad.webp",928,1201,{"page_no":413,"url":414,"width":415,"height":416},57,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/4fea253b1190a0230fa481e243495060.webp",927,1199,{"page_no":418,"url":419,"width":420,"height":421},58,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/87063d6d9279f01cea1a7c704242ad0b.webp",926,1198,{"page_no":423,"url":424,"width":425,"height":426},59,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/06faa6b2ac5900e2d8649df9475639ac.webp",925,1197,{"page_no":26,"url":428,"width":429,"height":430},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/06cb6cef4eeaadeeb7272b8afdfc0bb7.webp",924,1195]