资源描述:
《Java语言程序设计与数据结构 基础篇原书第11版PPT及其他教辅资源01slide.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、1Chapter1IntroductiontoComputers,Programs,andJava2ObjectivesTounderstandcomputerbasics,programs,andoperatingsystems(§§1.2–1.4).TodescribetherelationshipbetweenJavaandtheWorldWideWeb(§1.5).TounderstandthemeaningofJavalanguagespecification,API,JDK,andIDE(§1.6).TowriteasimpleJavaprog
2、ram(§1.7).Todisplayoutputontheconsole(§1.7).ToexplainthebasicsyntaxofaJavaprogram(§1.7).Tocreate,compile,andrunJavaprograms(§1.8).TousesoundJavaprogrammingstyleanddocumentprogramsproperly(§1.9).Toexplainthedifferencesbetweensyntaxerrors,runtimeerrors,andlogicerrors(§1.10).Todevelo
3、pJavaprogramsusingNetBeans(§1.11).TodevelopJavaprogramsusingEclipse(§1.12).3WhatisaComputer?AcomputerconsistsofaCPU,memory,harddisk,floppydisk,monitor,printer,andcommunicationdevices.4CPUThecentralprocessingunit(CPU)isthebrainofacomputer.Itretrievesinstructionsfrommemoryandexecute
4、sthem.Theunitofmeasurementofclockspeedisthehertz(Hz),with1hertzequaling1pulsepersecond.Inthe1990s,computersmeasuredclockspeedinmegahertz(MHz),butCPUspeedhasbeenimprovingcontinuously;theclockspeedofacomputerisnowusuallystatedingigahertz(GHz).Intel’snewestprocessorsrunatabout3GHz.5M
5、emoryMemoryistostoredataandprograminstructionsforCPUtoexecute.Amemoryunitisanorderedsequenceofbytes,eachholdseightbits.Aprogramanditsdatamustbebroughttomemorybeforetheycanbeexecuted.Amemorybyteisneverempty,butitsinitialcontentmaybemeaninglesstoyourprogram.Thecurrentcontentofamemor
6、ybyteislostwhenevernewinformationisplacedinit.6HowDataisStored?Dataofvariouskinds,suchasnumbers,characters,andstrings,areencodedasaseriesofbits(zerosandones).Computersusezerosandonesbecausedigitaldeviceshavetwostablestates,whicharereferredtoaszeroandonebyconvention.Theprogrammersn
7、eednottobeconcernedabouttheencodinganddecodingofdata,whichisperformedautomaticallybythesystembasedontheencodingscheme.Theencodingschemevaries.Forexample,character‘J’isrepresentedby01001010inonebyte.Asmallnumbersuchasthreecanbestoredinasinglebyte.Ifcomputerneedstostorealargenumbert
8、hatcannotfitintoasinglebyte,ituse