您好,欢迎访问三七文档
JAVAProgrammingJAVAProgrammingLanguageLanguageTeacherTeacher::SongminSongminTextbook:ThinkinginJavaTextbook:ThinkinginJava(2ndEdition)(2ndEdition)TeachingPlanTeachingPlanTeachingHour:56hTheory:40Practice:16CourseArrangement:QuestionTime:CourseGoalThemaingoaloftheJavaProgrammingLanguagecourseistoprovidestudentswiththeknowledgeandskillsnecessaryforobject-orientedprogrammingofadvancedJavaapplicationsandapplets.Inthiscourse,studentswilllearnJavaprogramminglanguagesyntaxandobject-orientedconcepts,aswellasmoresophisticatedfeaturesoftheJavaruntimeenvironment,suchassupportforgraphicaluserinterfaces(GUIs),multithreading,andnetworking.CourseOverviewSyntaxoftheJavaObject-orientedconceptsandtheapplytotheJavaGraphicaluserinterface(GUI)programmingAppletMultithreadingNetworkingCourseObjectives(1)Uponcompletionofthiscourse,studentshouldbeableto:DescribekeylanguagefeaturesCompileandrunaJavaapplicationUnderstandandusetheonlinehypertextJavatechnologydocumentationDescribelanguagesyntacticelementsandconstructsUnderstandtheobject-orientedparadigmUseobject-orientedfeaturesofJavaUnderstandanduseexceptionsUnderstandandusetheCollectionsAPIReadandwritetofilesCourseObjectives(2)Developagraphicaluserinterface(GUI)DescribetheJavatechnologyplatform’sAbstractWindowToolkitDevelopaprogramtotakeinputfromaGUIUnderstandeventhandlingDevelopJavaappletsUnderstandandusethejava.iopackageUnderstandthebasicsofmultithreadingDevelopmultithreadedJavaapplicationsandappletsDevelopJavaclientandserverprogramsusingTCP/IPChapter-by-ChapterOverview(1)1:IntroductiontoObjects2:EverythingisanObject3:ControllingProgramFlow4:Initialization&Cleanup5:HidingtheImplementation6:ReusingClasses7:PolymorphismChapter-by-ChapterOverview(2)8:Interfaces&InnerClasses9:HoldingYourObjects10:ErrorHandlingwithExceptions11:TheJavaI/OSystem12:Run-timeTypeIdentification13:CreatingWindows&Applets14:MultipleThreadsChapter-by-ChapterOverview(3)15:DistributedComputingAppendix–A:Passing&ReturningObjects–B:TheJavaNativeInterface(JNI)–C:JavaProgrammingGuidelines–D:ResourcesIndexWhatIstheJavaTechnology?Javatechnologyis:(1)Aprogramminglanguage(2)Adevelopmentenvironment(3)Anapplicationenvironment(4)AdeploymentenvironmentPrimaryGoalsoftheJavaTechnology(1)Providesaneasy-to-uselanguageby:(1)Avoidingthepitfallsofotherlanguages(2)Beingobject-oriented(3)EnablinguserstocreatestreamlinedandclearcodePrimaryGoalsoftheJavaTechnology(2)Providesaninterpretedenvironmentfor:(1)Improvedspeedofdevelopment(2)CodeportabilityEnablesuserstorunmorethanonethreadofactivityLoadsclassesdynamically,thisis,atthetimetheyareactuallyneededSupportsdynamicallychangingprogramsduringruntimebyloadingclassesfromdisparatesourcesFurnishesbettersecurityPrimaryGoalsoftheJavaTechnology(3)Thefollowingfeaturesfulfillthesegoals:(1)TheJavavirtualmachine(JVM)(2)Garbagecollection(3)CodesecurityChapter1.JavaIntroduction((((substitution))))•EvolvementofJava•JavaandtheInternet•Javatraits•Javavs.c++•VarietyofJavaprogram•Javaplatform–Briefintroduction–Versions•JavaWorkprinciples•Javaenvironments–Javaenvironments–Setenvironmentvariable–DevelopmentflowEvolvementofJava1990SunMicrosystemJamesGoslingOakJavaWhatistheWeb?–Client/Servercomputingserverclient–TheWebasagiantserverClient-sideprogrammingServer-sideprogrammingJavatraitsObject-orientedSimpleRobustSecurityPlatform-independentMultithreadingDynamicDistributedcomputingPerformanceGarbagecollectionJavavs.c++Java=“C++”--“complexityandoddity”+“securityandportable”Cross-platformNopointerNoOperatiorOverloadingNogotoSinglyrootedhierarchyPerformanceGarbagecollectionVarietyofJavaprogramAppleteg:Demo\jfc\Java2Demo.htmleg:JApplet_1.htmlApplicationeg:JavaApp_1ServletsJavaplatformBriefintroductionJava字节码(Bytecode)网络传输Java平台JavaVMJavaAPI硬件工作平台JavaplatformVersionsJava2EnterpriseEdition(J2EE)Java2StandardEdition(J2SE)Java2MicroEdition(J2ME)JavaWorkprinciples(1)WindowsWindowsOSOSUnixUnixOSOSMacMacOSOSJavaSourceJavaSourceFileFilecompilercompilerBytecodefile.classBytecodefile.classJREJREJREJREJREJREJavaWorkprinciples(2)JREJavaTMPlug-inJavaWorkprinciples(3)JavaenvironmentsJ2SDK((((Java2SoftwareDevelopmentKit))))––java–versionIDE–JBuilder、、、、VisualAgeforJava、、、、VisualJ++、、、、VisualCaféJavaenvironmentsC:\javabinlibclasses.zipjavacjavaappletviewerUserclassfiledirectorymyclassesCurrentdirectorySetEnviromentVariable:SetEnviromentVariableCmdSetpath=c:\…\java\binSETCLASSPATH=.;c:\...\lib\classes.zip;c:\myclasses;DevelopmentFlowUseaeditortowriteyourprogramSave:classname.javacompile:javacfilename.javaRun:–application:javaclassname–applet:appletviewerclassnameYourfirstapplication//HelloDate.javaimportjava.util.*;publicclassHelloDate{publicstaticvoidmain(String[]args){System.out.println(Hello”+args[0]+“it's:);System.out.println(newDate());}}save:HelloDate.javacompile:javacHelloDate.javarun:javaHelloDate“Alice”result:HelloAliceit’s2007-02-13//HelloDate.j
本文标题:Ch1_JAVA
链接地址:https://www.777doc.com/doc-6242064 .html