java代码 英汉小词典

import java.awt.*;import .*;import java.sql.*;import java.awt.event.*;import java.io.*;import java.util.Calendar;class DataWindow extends Frame implements ActionListener{ TextField searchWord_tField,expWord_tField,searchChineseField,expEnglishField,updWord_tField,updExpWord_tField,addNewWord_tField,addExpWord_tField;Button search_button,update_button,add_button,searchChinese_buton;int search_record=0;Connection Con=null;Statement Stmt=null;DataWindow(){ super("英汉小词典");setBounds(150,150,600,400);setVisible(true);message_log("DataWindow Start : ");try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");}catch(ClassNotFoundException e){}try{Con=DriverManager.getConnection("jdbc:odbc:data","lixuanxian","123");Stmt=Con.createStatement();message_log("Stmt="+Stmt);}catch(SQLException ee) {}searchWord_tField=new TextField(16);expWord_tField=new TextField(16);searchChineseField=new TextField(16);expEnglishField=new TextField(16);updWord_tField=new TextField(16);updExpWord_tField=new TextField(16);addNewWord_tField=new TextField(16);addExpWord_tField=new TextField(16);searchChinese_buton=new Button("确定");search_button=new Button("查询");update_button=new Button("更新");add_button=new Button("添加");Panel p1=new Panel(),p2=new Panel(),p3=new Panel(),p4=new Panel(),pset=new Panel(new GridLayout(5,2));p1.add(new Label("输入要查询的英语单词:"));p1.add(searchWord_tField);p1.add(new Label("显示英语单词的汉语解释:"));p1.add(expWord_tField);p1.add(search_button);p4.add(new Label("输入要查询的汉语:"));p4.add(searchChineseField);p4.add(new Label("显示英语单词的英文解释:"));p4.add(expEnglishField);p4.add(searchChinese_buton);p2.add(new Label("输入英语单词:"));p2.add(updWord_tField);p2.add(new Label("输入该单词更新的汉语解释:"));p2.add(updExpWord_tField);p2.add(update_button);p3.add(new Label("输入英语单词:"));p3.add(addNewWord_tField);p3.add(new Label("输入汉语解释:"));p3.add(addExpWord_tField);p3.add(add_button);pset.add(p1);pset.add(p4);pset.add(p2);pset.add(p3);add(pset);search_button.addActionListener(this);update_button.addActionListener(this);add_button.addActionListener(this);searchChinese_buton.addActionListener(this);addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e){ setVisible(false);System.exit(0);}});}public void actionPerformed(ActionEvent e){if (e.getSource()==search_button){search_record=0;try { query();}catch (SQLException ee) {}}else if (e.getSource()==update_button){try { modify();}catch (SQLException ee) {}}else if (e.getSource()==add_button){try { addNew();}catch (SQLException ee) {}}else if (e.getSource()==searchChinese_buton){try { queryChinese();}catch (SQLException ee) {}}}public void query() throws SQLException{message_log("query start");String cname, ename,text="'"+searchWord_tField.getText().trim()+"'";Con=DriverManager.getConnection("jdbc:odbc:data","lixuanxian","123");message_log("Con="+Con);ResultSet rs=Stmt.executeQuery("SELECT * FROM dict where English="+text);int n=0;message_log("in query : n="+n);while (rs.next()){message_log("while start " );ename=rs.getString("English"); cname=rs.getString("Chinese");message_log(ename+" "+cname);if(ename.trim().equals(searchWord_tField.getText().trim())){message_log("equal");message_log("in query : ename="+ename+" cname="+cname);expWord_tField.setText(cname);search_record=1;break;}message_log("not equal");}if(search_record==0){expWord_tField.setText("没有该单词");}}public void queryChinese() throws SQLException{message_log("queryChinese start");String cname, ename,text="'"+searchChineseField.getText().trim()+"'";Con=DriverManager.getConnection("jdbc:odbc:data","lixuanxian","123");message_log("Con="+Con);ResultSet rs=Stmt.executeQuery("SELECT * FROM dict where Chinese="+text);int n=0;message_log("in query : n="+n);while (rs.next()){message_log("while start " );ename=rs.getString("English"); cname=rs.getString("Chinese");message_log(cname+" "+ename);if(cname.trim().equals(searchChineseField.getText().trim())){message_log("equal");message_log("in query : cname="+cname+"ename="+ename);expEnglishField.setText(ename);search_record=1;break;}message_log("not equal");}if(search_record==0){expEnglishField.setText("没有该词语");}}public void modify() throws SQLException{message_log("modify start");String s1="'"+updWord_tField.getText().trim()+"'",s2="'"+updExpWord_tField.getText().trim()+"'";String temp="UPDATE dict SET Chinese=" +s2+" WHERE English= "+s1;Con=DriverManager.getConnection("jdbc:odbc:data","lixuanxian","123");Stmt.executeUpdate(temp);updWord_tField.setText(null);updExpWord_tField.setText(null);Con.close();}public void addNew() throws SQLException{message_log("addNew start");String s1="'"+addNewWord_tField.getText().trim()+"'",s2="'"+addExpWord_tField.getText().trim()+"'";String temp="INSERT INTO dict VALUES("+ s1+", "+s2+")";Con=DriverManager.getConnection("jdbc:odbc:data","lixuanxian","123");Stmt.executeUpdate(temp);addNewWord_tField.setText(null);addExpWord_tField.setText(null);Con.close();}public void message_log(String msg){try {java.util.Date RightNow = Calendar.getInstance().getTime();java.text.SimpleDateFormat LOG_FILENAME_SDF=new java.text.SimpleDateFormat("yyyyMMdd");java.text.SimpleDateFormat SMS_LOG_DETAIL_TIME=new java.text.SimpleDateFormat("yyyy/MM/dd HH:mm:ss ");// get the Log File LocationFileOutputStream fos;fos = new FileOutputStream("F:\\李选贤\\java\\英汉小词典\\log\\"+LOG_FILENAME_SDF.format(RightNow) + "_Database.log" ,true);PrintWriter pw = new PrintWriter(fos);pw.print(SMS_LOG_DETAIL_TIME.format(RightNow));pw.println(" " + msg);pw.close();fos.close();} catch (Exception ex) {System.out.println(msg);System.out.println("SMSMsgLog: Error \r\n"+ex.getMessage());ex.printStackTrace();}}}public class dictionary{public static void main(String args[]){DataWindow window1=new DataWindow();window1.pack();}}。

合集下载

Java编程语言外文翻译、英汉互译、中英对照

Java编程语言外文翻译、英汉互译、中英对照

文档从互联网中收集,已重新修正排版,word格式支持编辑,如有帮助欢迎下载支持。

外文翻译原文及译文学院计算机学院专业计算机科学与技术班级学号姓名指导教师负责教师Java(programming language)Java is a general-purpose, concurrent, class-based, object-oriented computer program- -ming language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to run on another. Java applications are typically compiled to byte code (class file) that can run on any Java virtual machine(JVM) regardless of computer architecture. Java is, as of 2012, one of the most popular programming languages in use, particularly for client-server web applications, with a reported 10 million users. Java was originally developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++, but it has fewer low-level facilities than either of them.The original and reference implementation Java compilers, virtual machines, and class libraries were developed by Sun from 1991 and first released in 1995. As of May 2007, in compliance with the specifications of the Java Community Process, Sun relicensed most of its Java technologies under the GNU General Public License. Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java and GNU Classpath.Java is a set of several computer software products and specifications from Sun Microsystems (which has since merged with Oracle Corporation), that together provide a system for developing application software and deploying it in across-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones on the low end, to enterprise servers and supercomputers on the high end. While less common, Java appletsare sometimes used to provide improved and secure functions while browsing the World Wide Web on desktop computers.Writing in the Java programming language is the primary way to produce code that will be deployed as Java bytecode. There are, however, byte code compilers available forother languages such as Ada, JavaScript, Python, and Ruby. Several new languages have been designed to run natively on the Java Virtual Machine (JVM), such as Scala, Clojure and Groovy.Java syntax borrows heavily from C and C++, but object-oriented features are modeled after Smalltalk and Objective-C. Java eliminates certain low-level constructs such as pointers and has a very simple memory model where every object is allocated on the heap and all variables of object types are references. Memory management is handled through integrated automatic garbage collection performed by the JVM.An edition of the Java platform is the name for a bundle of related programs from Sun that allow for developing and running programs written in the Java programming language. The platform is not specific to any one processor or operating system, but rather an execution engine (called a virtual machine) and a compiler with a set of libraries that are implemented for various hardware and operating systems so that Java programs can run identically on all of them. The Java platform consists of several programs, each of which provides a portion of its overall capabilities. For example, the Java compiler, which converts Java source code into Java byte code (an intermediate language for the JVM), is provided as part of the Java Development Kit (JDK). The Java Runtime Environment(JRE), complementing the JVM with a just-in-time (JIT) compiler, converts intermediate byte code into native machine code on the fly. An extensive set of libraries are also part of the Java platform.The essential components in the platform are the Java language compiler, the libraries, and the runtime environment in which Java intermediate byte code "executes" according to the rules laid out in the virtual machine specification.In most modern operating systems (OSs), a large body of reusable code is provided to simplify the programmer's job. This code is typically provided as a set of dynamically loadable libraries that applications can call at runtime. Because the Java platform is not dependent on any specific operating system, applications cannot rely on any of the pre-existing OS libraries. Instead, the Java platform provides a comprehensive set of its own standard class libraries containing much of the same reusable functions commonly found in modern operating systems. Most of the system library is also written in Java. For instance, Swing library paints the user interface and handles the events itself, eliminatingmany subtle differences between how different platforms handle even similar components.The Java class libraries serve three purposes within the Java platform. First, like other standard code libraries, the Java libraries provide the programmer a well-known set of functions to perform common tasks, such as maintaining lists of items or performing complex string parsing. Second, the class libraries provide an abstract interface to tasks that would normally depend heavily on the hardware and operating system. Tasks such as network access and file access are often heavily intertwined with the distinctive implementations of each platform. The and java.io libraries implement an abstraction layer in native OS code, then provide a standard interface for the Java applications to perform those tasks. Finally, when some underlying platform does not support all of the features a Java application expects, the class libraries work to gracefully handle the absent components, either by emulation to provide a substitute, or at least by providing a consistent way to check for the presence of a specific feature.The success of Java and its write once, run anywhere concept has led to other similar efforts, notably the .NET Framework, appearing since 2002, which incorporates many of the successful aspects of Java. .NET in its complete form (Microsoft's implementation) is currently only fully available on Windows platforms, whereas Java is fully available on many platforms. .NET was built from the ground-up to support multiple programming languages, while the Java platform was initially built to support only the Java language, although many other languages have been made for JVM since..NET includes a Java-like language called Visual J# (formerly named J++) that is incompatible with the Java specification, and the associated class library mostly dates to the old JDK 1.1 version of the language. For these reasons, it is more a transitional language to switch from Java to the .NET platform, than a first class .NET language. Visual J# was discontinued with the release of Microsoft Visual Studio 2008. The existing version shipping with Visual Studio 2005will be supported until 2015 as per the product life-cycle strategy.In June and July 1994, after three days of brainstorming with John Gage, the Director of Science for Sun, Gosling, Joy, Naughton, Wayne Rosing, and Eric Schmidt, the team re-targeted the platform for the World Wide Web. They felt that with the advent of graphical web browsers like Mosaic, the Internet was on its way to evolving into the samehighly interactive medium that they had envisioned for cable TV. As a prototype, Naughton wrote a small browser, Web Runner (named after the movie Blade Runner), later renamed Hot Java.That year, the language was renamed Java after a trademark search revealed that Oak was used by Oak Technology. Although Java 1.0a was available for download in 1994, the first public release of Java was 1.0a2 with the Hot Java browser on May 23, 1995, announced by Gage at the Sun World conference. His announcement was accompanied by a surprise announcement by Marc Andreessen, Executive Vice President of Netscape Communications Corporation, that Netscape browsers would be including Java support. On January 9, 1996, the Java Soft group was formed by Sun Microsystems to develop the technology.Java编程语言Java是一种通用的,并发的,基于类的并且是面向对象的计算机编程语言,它是为实现尽可能地减少执行的依赖关系而特别设计的。

用java实现的英汉词典

用java实现的英汉词典

⽤java实现的英汉词典import java.io.*;import java.util.*;public class MyDictionary {static private Map<String, String > dict= new HashMap();static private int size;public static int getSize(){return size;}public static void insertPare(String EN, String CN){dict.put(EN, CN);size ++;}public static void flushToFile() throws IOException{File file = new File("dict.dat");FileOutputStream fop = new FileOutputStream(file);ObjectOutputStream oos = new ObjectOutputStream(fop);oos.writeObject(dict);oos.flush();oos.close();fop.close();}public static Map<String, String> getFromFile(String fileName)throws IOException, ClassNotFoundException{FileInputStream fis = new FileInputStream(fileName);ObjectInputStream ois = new ObjectInputStream(fis);Map<String, String> dict = (Map<String, String>) ois.readObject();fis.close();ois.close();return dict;}public static String query(String EN)throws IOException, ClassNotFoundException{Map<String, String> map = getFromFile("dict.dat");return map.get(EN);}public static void main(String[] args){insertPare("amnesty", "赦免");insertPare("torture","虐待");insertPare("scandal","丑闻");try {flushToFile();System.out.print("your query: ");Scanner scan = new Scanner(System.in);String read = scan.nextLine();System.out.println(query(read));}catch (Exception e){}}}真可谓是⼈⽣不易,⼩学期过得艰难。

java课程设计——英汉电子词典编程

java课程设计——英汉电子词典编程

Java课程设计——英汉电子词典一、需求分析二十世纪后半叶,以电子计算机为代表的现代科学获得了突飞猛进的发展并迅速和人们的日常生活结合在一起。

计算机技术的发展和进步也使电子语言词典的诞生成为可能。

我们日常的学习生活中,常会遇到这样的问题:在工作时或在网上冲浪,或者电子邮箱中收到一封外国朋友发的英文E-mail,遇到某些陌生的单词,可又疲于去翻查厚重的英文字典时,电脑中所安装的英汉电子词典便成为了最为方便、快捷的选择。

电子词典是一种多功能的词典类工具软件,它可以即时翻译,快速、准确、详细地查阅英文单词,或将中文单词进行英文翻译,使自己的知识面拓展得更宽、更广。

尽管电子词典只有十来年的历史,但它却已经发展壮大,成为词典家族中具有旺盛生命力的一员。

虽然目前它尚不足以取代传统词典,但在英语学习和教学中,由于它实用、快捷、准确、经济等特点,已经成为传统英汉词典的有力竞争者,并对传统的词典提出了挑战。

本系统是一个采用Microsoft Access作为数据库,用JAVA作为开发工具的英汉电子词典,内有英汉词典、汉英词典和备份词库。

它不仅可实现英译汉、汉译英的基本翻译功能,还可以让用户根据自己的需要添加、修改、删除词库,形成自己的词库。

其功能结构图如图1.1所示:英语小词典文件编辑英汉词典汉英词典备份词库退出添加词汇修改词汇删除词汇图1.1功能结构图功能模块说明:1、英译汉功能模块说明:可以实现对英文单词对中文单词的查询功能。

用户文本框中输入要查询的英语单词。

若该单词存在于词库中,则会在文件对话框中显示其词性及中文翻译;若该单词没有存在于词库中,则会弹出“警告”,说明“查无此词”;若没有输入直接点击“查询”,则会弹出“警告”,说明“查询对象不能为空”。

2、汉译英功能模块说明:可以实现对中文单词对英文单词的查询功能。

用户可在文本框中输入要查询的中文单词。

若该单词存在于词库中,则会在文件对话框中显示一个或多个对应的英文;若该单词没有存在于词库中,则会弹出“警告”,说明“查无此词”;若没有输入直接点击“查询”,则会弹出“警告”说明“查询对象不能为空”。

JAVA编程常用英文单词汇总

JAVA编程常用英文单词汇总

JAVA编程常用英文单词汇总Java Basic Common English Vocabulary (70 in total)OO: object-oriented。

oriented towards objectsOOP: object-oriented programming。

oriented towards object programmingJDK: Java development kit。

Java development toolkitJVM: Java virtual machine。

Java virtual machine___: ___Run: runClass: classObject: objectSystem: systemout: outputprint: printline: linevariable: variabletype: typen: n。

narray: array parameter: parameter method: methodn: n___-variable: ___ variable n: ___get: getset: setpublic: publicprivate: private protected: protected default: default access: access package: package import: importstatic: staticvoid: void (return type) extends: extendsparent class: parent class base class: base classsuper class: super classchild class: child classderived class: derived classoverride: override。

overwriteoverload: overloadfinal: final。

JAVA与“英汉小词典”的实现

JAVA与“英汉小词典”的实现

JA V A与“英汉小词典”的实现叙又2OO8.O4(下删)圆JV与"英汉小词典"的实现口许媛(陕西安康职业技术学院陕西?安康725000)摘要本文叙述了Java的出现背景,主要特点以及用Java语言制作的英汉小词典,指出Java是当今1T产业和人类文明的创新和希望.关键词程序设计JA V AJDBC英汉小词典中图分类号:G434文献标识码:A文章编号:1672—7894(2008}04—059—01——,JavaJava是1995年6月由Sun公司的JamesGosling开发的革命性编程语言.它以c++为基础,但是却是一个全新的软件开发语言.Java能使所有东西从桌面计算平稳的转变为基于网络的计算,它是专门为此而建立的,并显然是为了完成这个任务而来的.使用Java,我们可以相对轻松的一天编写一个有条理的网络程序.今天,Java的网络功能正在飞跃发展,不断有新的特性增加到这个有价值的基础上.Java语言被美国着名杂志PC?Magazine评为1995年十大优秀科技产品(计算机类仅此一项人选)之一,随之大量出现了用Java编写的软件产品,受到工业界的重视与好评,认为"Java是八十年代以来计算机界的一件大事".Java语言是一种适用于网络编程的语言,它的基本结构与c++极为相似,但却简单得多.它集成了其它一些语言的特点和优势,又避开了它们的不足之处.它具有简单,面向对象,稳定,平台独立,解释型,多线程,动态等主要特点.还有高性能,分布性,强大性,解释性,可移植性等.二,设计过程整体设计过程中我使用了JDBC——JA V A数据库连接.们在这简单地说,就是JDBC能完成3件事:(1)与一个数据库建立连接;(2)向数据库发送SQL语句;(3)处理数据库返回的结果;系统可以采用任何一种流行的,Java支持的操作系统,本系统一个用Access设计的数据库的数据表中.在Access数据库中,数据表名称为"词典内容",表中有2个字词典,所以,用户在使用或者运行的过程中应该按照英语单词查询.Importjava.awt.;.:Importjava.sq1.;Importjava.awt.event.; ClassDataWindowextendsFrameimplementActionListener {TextHeldenglishtext;TextAreachinesetext;Buttonbutton; DataWindow(){super("英汉小词典");setBackground(Color.cyan);setBounds(150,150,300,12o);setVisible (true);englisbtext=newTextField(16);chinesetext=newTextArea(5,1o); button=newButton("确定");panelpl=newPanel(),p2=newPanel(),p1.add(newLabe1("输入所要查询的英语单词:"));p1.add(eng—lishtext);p2.add(button);add(p1,"North");addS2,"South");add(chinesetext,"Center"); chinesetext.setBackground(Color.pink);button.addActionListener(this); addWindowListenenewWindowAdapter0 {publicvoidwindowClosing(WindowEvente){setVisible(false);System.exit(0);}1); publicvoidactionPerformed(ActionEvente)I遗e.getSourceo==button){chinesetext.setText0;}Catch(SQLExceptionec){}PublicvoidListstudent0throwsSQLException {Stringcname,ename;try{Class.forName("sun.jdbc.osbcJdbc0dbcDriner");}catch(ClassNotFoundExceptione);{)ConnectionEx1con=DriverManager.getConnection(''jdbc:adbc: test","gxy","ookk");StatementExlStmt=ExlCon.createStatement0;ResultSetrs=ExlStmt.executeQuery("SELECTFROM词典内容");While(rs.nextO){ename=rs.getString("单词");cname--rs.getString("解释");if(ename.equals(englishext.getText0)){chinesetext.append('kn'+cname);break;}ExlCon.close0;if(chinesetext.getText0.trimO.equ~e("查询结果")){chinesetext.append('kn'+"没有此单词");} publicclassDatabaseTest{publicstaticvoidmain(StringargsH),{DataWindowwindow=newDataWindowO;window.pack0;三,运行界面分,第一部分显示"输入要查询的英语单词:",有一空白文本框让后,可以单击"确定"按钮.Java自问世以来,以其得天独厚的优势,在IT业界掀起了研究,件无关的,"编写一次,到处运行"的高级语言和计算平台,Java天生就具有将网络上的各个平台连成一体的能力,真正实现了"网络就是计算机"的理念.以Java为代表的网络的成长,改变了我们的一场类似印刷术的重大变革.毫无疑问,它将影响人类社会的发展.Java是当今IT产业和人类文明的创新和希望!参考文献:[I】(美)DavidM.GearyJava2.Java2图形设计卷二:Swing编程思想;(美) BruceEekdUNIX网络编程(第一卷).[2]耿祥义,张跃平着.王克宏审java2实用教程(修订).清华大学出版社, 2o01.59。

最新JAVA开发常用英语词汇

最新JAVA开发常用英语词汇

JAVA开发常用英语词汇public['pʌblik] 公共的,公用的 static['stætik] 静的;静态的;静止的void:[vɔid] 空的 main:[mein] 主要的重要的class:[klɑ:s] 类 system:['sistəm] 系统方法out:[aut] 出现出外 print:[print ] 打印eclipse:[i'klips] java编程软件 string:[striŋ] 字符串类型double:['dʌbl] 双精度浮点型 int:[int] 整型char:[tʃɑ:] 字符型 scanner:['skænə] 接收输入integer:['intidʒə]整数整型 type:[taip]类型boolean:['bu:li:ən] 布尔类型真假二值 true:[tru:]真false:[fɔ:ls]假不正确的 if:[if] 如果else:[els] 否则 simple:['simpl] 简单单一体case:[keis] 实例框架 default:[di'fɔ:lt] 或者switch:[switʃ] 判断语句 break:[breik] 退出match:[mætʃ] 匹配 assess:[ə'ses] 评估exception:[ik'sepʃən] 异常 equals:['i:kwəls]判断两个字符串是否相等while:[hwail] 循环 index:['indeks] 下标bug:[bʌg] 缺陷 debug:[di:'bʌg] 调试step:[step] 步骤 error:['erə] 错误answer:['ɑ:nsə] 答案回答 rate:[reit] 比率young:[jʌŋ] 年轻的 schedule:['skedʒul] 表清单negative:['negətiv] 否定的 customer:['kʌstəmə] 顾客买主birthday:['bə:θdei] 生日 point:[pɔint] 分数得分continue:[kən'tinju:] 进入到下一个循环 return:[ri'tə:n] 返回(值)schedule:['skedʒul] 表清单 total:['təutl] 总人数,,全体的array:[ə'rei] 数组 length:[leŋθ] 长度sort:[sɔ:t] 分组排序 primitive:['primitiv] 初始的简单的reference:['refərəns] 参照证明关系 info:['infəu] 通知报告消息interface:['intəfeis] 接口 random:['rændəm] 随机数insert:[in'sə:t] 插入嵌入 compare:[kəm'pɛə] 比较对照ignore:[ig'nɔ:] 忽视不理会 triangle:['traiæŋgl] 三角形invert:[in'və:t] 使转位倒转 diamond:['daiəmənd] 菱形password:['pɑ:swə:d] 密码口令 change:[tʃeindʒ] 交换互换password:['pɑ:swə:d] 口令密码 administrator:[əd'ministreitə] 管理员initial:[i'niʃəl] 开始的最初的 class:[klɑ:s] 类object:['ɔbdʒikt] 物体对象 return:[ri'tə:n 返回encapsulation:[in,kæpsju'leiʃən] 封装 null:[nʌl] 空的person:['pə:sn] 人 start:[stɑ:t] 开始menu:['menju:] 菜单 login:[lɔg'in] 注册登陆main:[mein] 主要的 document:['dɔkjumənt] 文档display:[di'splei] 显示 method:['meθəd] 方法条理version:['və:ʃən] 译文版本 orient:['ɔ:riənt] 东方的parameter:[pə'ræmitɚ] 参数 since:[sins] 自…..之后calculator:['kælkju,leitə] 计算 shape:[ʃeip] 形状open:[əup] 开放 change:[tʃeindʒ] 交换互换date:[deit] 日期日子 research:[ri'sə:tʃ] 研究调查triangle:['traiæŋgl] 三角形 practice:['præktis] 练习loan:[ləun] 借出借给 operator:['ɔpə,reitə] 操作员protect:[prə'tekt] 保卫护卫 private:['praivit] 私人的私有的manage:['mænidʒ] 控制 search:[sə:tʃ] 搜寻查找upper:['ʌpə] 上面的 equal:['i:kwəl] 相等的ignore:[ig'nɔ:] 忽视驳回 lower:['ləuə] 较低的下部的last:[lɑ:st] 最后的 trim:[trim] 切除修改缩减buffer:['bʌfə] 缓冲储存器 final:['fainl] 最后的最终的score:[skɔ:]成绩 price:[prais]价钱test:[test]测试、实验 demo:['deməu]样本sum:[sʌm] 和 num:[nʌm] 数字height:[hait] 身高 weight :[weit] 体重music:['mju:zik] 音乐 computer:[kəm'pju:tə] 电脑student:['stju:dənt] 学生 total:['təutl] 总计的,总括的,全体的max 最大的 min 最小的avg 平均分 Add 加Minus 减 multiply:['mʌltiplai] 乘divide:[di'vaid] 除 Monday:['mʌndei] 星期一Tuesday:['tju:zdi] 星期二 Wednesday:['wenzdi] 星期三Thursday:['θə:zdi] 星期四 Friday:['fraidi] 星期五Saturday:['sætədi] 星期六 Sunday:['sʌndi] 星期日月份+缩写一月:January Jan. 二月:February Feb. 三月:March Mar. 四月:April Apr.五月:May –六月:June –七月:July –八月:August Aug. 九月:September Sept. 十月:October Oct. 十一月:November Nov. 十二月:December Dec 春spring 夏 summer秋 autumn(fall) 冬 winter项目常用单词argument 参量 abstract 抽象ascent 提升 already 已经API(Application Programming Interface)应用程序接口byte 字节 Boolean 布尔banana香蕉 base 基础buffer缓冲器 button 按钮break 中断 body 身体color 颜色 class 类count 计数 client 客户code 代码 calculation 计算cell 单元 circle圆capital首都 catch捕获check 检查 container容器component 组件 command 命令cube立方,三次方 char(=character)字符cancel取消 case 情况choice选择 click单击center 中心 compile编译clone克隆,复制 continue 继续create建立 draw 绘图data数据 demo 示例 DLL(Dynamic Link Library)动态链接库document 文档 descent 继承division 分裂,除法 define定义,说明display显示 error 错误extends 扩展 executed 执行event 事件 enter 输入,回车键exception 异常 except 除外employee 雇员 environment环境east 东方 equal 相等float 单精度型 fruit 水果file 文件 find 发现found 发现 field 域final 终结的 friend 朋友fill 填充 focus 焦点font 字体 factorial 阶乘graphic 图像 grid 方格GUI图形化用户接口 get 得到host 主机 height 高度init(=initialize)初始化 input 输入implement 实现 instance 实例io(=input/output)输出输入 interrupted 中断int(=integer)整型 item元素interface 接口 inner 内部的import 导入 index 索引Java 爪哇 JDK(JavaDevelopment Kit) Java开发工具JSP(Java Server Page) Java服务页 JVM(Java VirtualMachine) Java虚拟机Kit 工具 image 图像language 语言 loop 循环long 长整型 label 标签layout 布局 list 列表listener 收听者 move 移动menu 菜单 mode 模式method 方法 metric 米的,公尺motion 运动 manager 经理main 主要的 msg(=message) 消息new 新的 number 数字north 北方 native 本地的override 过载 orange 橘子output 输出 object 对象out 外部的 state 状态public 公共的 protected保护的private 私有的 property 属性point 点 price 价格problem 问题 package 打包,包裹print 打印 path 路径polygon 多边形 program 程序prompt 提示 parse 分析press 按,压 panel 面板paint 画 return 返回runnable 可运行的 radius 半径round 环绕 release 释放rect(=rectangle)长方形 radio 无线电resolve 解析 short 短整型south 南方的 string 字符串static 静态的 system 系统seed 种子 seasonal 季节的set 设置 super 超级square 平方,二次方 sub 替代的screen 屏幕 sound声音salary 薪水 sleep 睡觉size 大小,尺寸 start 开始sort 排序 status 状态synchronize 同步发生 switch 开关stream 流 symbol 符号true 真的 title 标题type 类型 temp(=temporary)暂时的throw 扔 thread 线程temperate 温度 tool 工具try 试图 undefined 未定义UI(UserInterface) 用户接口 update 更新volatile 挥发性 visible 不可见的virtual 虚拟的 variable 变量value 数值 void 无返回值的colume 列 viewer 观察者vector 矢量 URL(Uniform Resource Locator) 统一资源定位器Database 数据库 table 数据表Border 边框 padding 内边距Margin 外边距 float 浮动、漂浮clear 清除、清理 position 位置、定位。

java编程常用英语词汇

java编程常用英语词汇Java Programming Common English VocabularyJava is a popular programming language widely used for developing various applications and systems. As a programmer, it is essential to have a good understanding of the common English vocabulary used in the Java programming language. This article will introduce and explain frequently used Java programming terms in English.1. ClassIn Java, a class is a template or blueprint for creating objects. It defines the properties (variables) and functionalities (methods) of an object. Classes are used to create multiple objects that share similar characteristics.2. ObjectAn object is an instance of a class. It represents a real-world entity with its own set of properties and behaviors. Objects are created from a class and can interact with each other through methods.3. MethodA method is a set of instructions or code that performs a specific task. It is also known as a function in other programming languages. Methods are defined inside a class and can be reused and called multiple times throughout the program.4. VariableA variable is a named container used to store data in a program. It has a specific data type and can hold different values during the execution of the program. Variables provide a way to manipulate and reference data within the program.5. Data TypeIn Java, every variable has a data type that determines the type of data it can hold. The common data types in Java include integers (int), floating-point numbers (float, double), characters (char), booleans (boolean), and strings (String).6. LoopA loop is a control structure used to repeat a block of code multiple times. It allows the programmer to execute a set of statements repeatedly until a certain condition is met. The three main types of loops in Java are the for loop, while loop, and do-while loop.7. Conditional StatementA conditional statement is used to make decisions in a program based on certain conditions. It allows the program to execute different sets of instructions depending on the outcome of a condition. The if-else statement and switch statement are commonly used conditional statements in Java.8. InheritanceInheritance is a mechanism in Java that allows a class to inherit properties and methods from another class. It promotes code reusability and supports the concept of parent and child classes. Inheritance is implemented using the extends keyword in Java.9. PolymorphismPolymorphism allows objects of different classes to be treated as objects of a common superclass. It enables a single interface to be used for multiple implementations. Polymorphism in Java is achieved through method overriding and method overloading.10. Exception HandlingException handling is a mechanism used to catch and handle errors or exceptional situations that occur during program execution. It allows the programmer to handle errors gracefully and prevents the program from crashing. The try-catch block is used to handle exceptions in Java.11. InterfaceAn interface is a collection of abstract methods that define a contract for classes to implement. It specifies the behavior that a class should provide but does not provide any implementation details. To implement an interface, a class must use the implements keyword in Java.In conclusion, these are just a few of the many English vocabulary terms commonly used in Java programming. Mastering these terms will greatly enhance your understanding of the language and help you become a proficient Java programmer.。

java 编程常用英语单词 解释

abstract (关键字) 抽象['æbstrækt]access vt.访问,存取['ækses]'(n.入口,使用权)algorithm n.算法['ælgәriðm]Annotation [java] 代码注释[ænәu'teiʃәn]anonymous adj.匿名的[ә'nɒnimәs]'(反义:directly adv.直接地,立即[di'rektli, dai'rektli]) apply v.应用,适用[ә'plai]application n.应用,应用程序[,æpli'keiʃәn]' (application crash 程序崩溃)arbitrary a.任意的['ɑ:bitrәri]argument n.参数;争论,论据['ɑ:gjumәnt]'(缩写args)assert (关键字) 断言[ә'sә:t] ' (java 1.4 之后成为关键字)associate n.关联(同伴,伙伴) [ә'sәuʃieit]attribute n.属性(品质,特征) [ә'tribju:t]boolean (关键字) 逻辑的, 布尔型call n.v.调用; 呼叫; [kɒ:l]circumstance n.事件(环境,状况) ['sә:kәmstәns]crash n.崩溃,破碎[kræʃ]cohesion 内聚,黏聚,结合[kәu'hi:ʒәn](a class is designed with a single, well-focoused purpose. 应该不止这点) command n. 命令,指令[kә'mɑ:nd](指挥, 控制) (command-line 命令行) Comments [java] 文本注释['kɒments]compile [java] v.编译[kәm'pail]' Compilation n.编辑[,kɒmpi'leiʃәn]const (保留字)constant n. 常量, 常数, 恒量['kɒnstәnt]continue (关键字)coupling 耦合,联结['kʌpliŋ]making sure that classes know about other classes only through their APIs. declare [java] 声明[di'klєә]default (关键字) 默认值; 缺省值[di'fɒ:lt]delimiter 定义符; 定界符Encapsulation[java] 封装(hiding implementation details)Exception [java] 例外; 异常[ik'sepʃәn]entry n.登录项, 输入项, 条目['entri]enum (关键字)execute vt.执行['eksikju:t]exhibit v.显示, 陈列[ig'zibit]exist 存在, 发生[ig'zist] '(SQL关键字exists)extends (关键字) 继承、扩展[ik'stend]false (关键字)final (关键字) finally (关键字)fragments 段落; 代码块['frægmәnt]FrameWork [java] 结构,框架['freimwә:k]Generic [java] 泛型[dʒi'nerik]goto (保留字) 跳转heap n.堆[hi:p]implements (关键字) 实现['implimәnt]import (关键字) 引入(进口,输入)Info n.信息(information [,infә'meiʃәn] )Inheritance [java] 继承[in'heritәns] (遗传,遗产)initialize 预置初始化[i'niʃәlaiz]instanceof (关键字) 运算符,用于引用变量,以检查这个对象是否是某种类型。

JAVA编程常用英文单词汇总

J A V A编程常用英文单词汇总The saying "the more diligent, the more luckier you are" really should be my charm in2006.Java基础常见英语词汇共70个OO: object-oriented ,面向对象OOP: object-oriented programming,面向对象编程JDK:Java development kit, java开发工具包JVM:java virtual machine ,java虚拟机Compile:编绎Run:运行Class:类Object:对象System:系统out:输出print:打印line:行variable:变量type:类型operation:操作,运算array:数组parameter:参数method:方法function:函数member-variable:成员变量member-function:成员函数get:得到set:设置public:公有的private:私有的protected:受保护的default:默认access:访问package:包import:导入static:静态的void:无返回类型extends:继承parent class:父类base class:基类super class:超类child class:子类derived class:派生类override:重写,覆盖overload:重载final:最终的,不能改变的abstract:抽象interface:接口implements:实现exception:异常Runtime:运行时ArithmeticException:算术异常ArrayIndexOutOfBoundsException:数组下标越界异常NullPointerException:空引用异常ClassNotFoundException:类没有发现异常NumberFormatException:数字格式异常字符串不能转化为数字Catch:捕捉Finally:最后Throw:抛出Throws: 投掷表示强制异常处理Throwable:可抛出的表示所有异常类的祖先类Lang:language,语言Util:工具Display:显示Random:随机Collection:集合ArrayList:数组列表表示动态数组HashMap: 散列表,哈希表Swing:轻巧的Awt:abstract window toolkit:抽象窗口工具包Frame:窗体Size:尺寸Title:标题Add:添加Panel:面板Layout:布局Scroll:滚动Vertical:垂直Horizonatal:水平Label:标签TextField:文本框TextArea:文本域Button:按钮Checkbox:复选框Radiobutton:单选按钮Combobox:复选框Event:事件Mouse:鼠标Key:键Focus:焦点Listener:监听Border:边界Flow:流Grid:网格MenuBar:菜单栏Menu:菜单MenuItem:菜单项PopupMenu:弹出菜单Dialog:对话框Message:消息 Icon:图标Tree:树Node:节点Jdbc:java database connectivity, java数据库连接DriverManager:驱动管理器Connection:连接Statement:表示执行对象Preparedstatement:表示预执行对象Resultset:结果集Next:下一个Close:关闭executeQuery:执行查询Jbuilder中常用英文共33个File:文件New:新建New Project:新建项目New Class: 新建类New File:新建文件Open project:打开项目Open file:打开文件Reopen:重新打开Close projects:关闭项目Close all except…:除了..全部关闭Rename:重命名Exit:退出View:视图Panes:面板组Project:项目Content:内容Structure:结构Message:消息Source:源文件Bean:豆子Properties:属性Make:编绎Build:编绎Rebuild:重编绎Refresh:刷新Project properties:项目属性Default project properties:默认的项目属性Run:运行Debug:调试Tools:工具Preferences:参数配置Configure:配置Libraries:库JSP中常用英文URL: Universal Resource Location:统一资源定位符IE: Internet Explorer 因特网浏览器JSP:java server 服务器页面Model:模型View:视图C:controller:控制器Tomcat:一种jsp的web服务器WebModule:web模块Servlet:小服务程序Request:请求Response:响应Init: initialize,初始化Service:服务Destroy:销毁Startup:启动Mapping:映射pattern:模式Getparameter:获取参数Session:会话Application:应用程序Context:上下文redirect:重定向dispatch:分发forward:转交setAttribute:设置属性getAttribute:获取属性page:页面contentType:内容类型charset:字符集include:包含tag:标签taglib:标签库EL:expression language,表达式语言Scope:作用域Empty:空JSTL:java standard tag library,java标准标签库TLD:taglib description,标签库描述符Core:核心Test:测试Foreach:表示循环Var:variable,变量Status:状态Items:项目集合Fmt:format,格式化Filter:过滤器报错英文第一章:JDKJava Development Kit java开发工具包JVMJava Virtual Machine java虚拟机Javac编译命令java解释命令Javadoc生成java文档命令classpath 类路径Version版本author作者public公共的class类static静态的void没有返回值String字符串类System系统类out输出print同行打印println换行打印JITjust-in-time及时处理第二章:byte 字节char 字符boolean 布尔short 短整型int 整形long 长整形float 浮点类型double 双精度if 如果else 否则switch 多路分支case 与常值匹配break 终止default 默认while 当到循环do 直到循环for 已知次数循环continue结束本次循环进行下次跌代length 获取数组元素个数第三章:OOPobject oriented programming 面向对象编程Object 对象Class 类Class member 类成员Class method类方法Class variable 类变量Constructor 构造方法Package 包Import package 导入包第四章:Extends 继承Base class 基类Super class 超类Overloaded method 重载方法Overridden method 重写方法Public 公有Private 私有Protected 保护Static 静态Abstract抽象Interface 接口Implements interface 实现接口第五章:Exception 意外,异常RuntimeExcepiton 运行时异常ArithmeticException 算术异常IllegalArgumentException 非法数据异常ArrayIndexOutOfBoundsException 数组索引越界异常NullPointerException 空指针异常ClassNotFoundException 类无法加载异常类不能找到NumberFormatException 字符串到float类型转换异常数字格式异常IOException 输入输出异常FileNotFoundException 找不到文件异常EOFException 文件结束异常InterruptedException 线程中断异常try 尝试catch 捕捉finally 最后throw 投、掷、抛throws 投、掷、抛print Stack Trace 打印堆栈信息get Message 获得错误消息get Cause 获得异常原因method 方法able 能够instance 实例check 检查第六章:byte字节char字符int整型long长整型float浮点型double双精度boolean布尔short短整型Byte 字节类Character 字符类Integer整型类Long 长整型类Float浮点型类Double 双精度类Boolean布尔类Short 短整型类Digit 数字Letter 字母Lower 小写Upper 大写Space 空格Identifier 标识符Start 开始String 字符串length 值equals 等于Ignore 忽略compare 比较sub 提取concat 连接replace 替换trim 整理Buffer 缓冲器reverse 颠倒delete 删除append 添加Interrupted 中断的第七章:Date 日期,日子After 后来,后面Before 在前,以前Equals 相等,均等toString 转换为字符串SetTime 设置时间Display 显示,展示Calendar 日历Add 添加,增加GetInstance获得实例getTime 获得时间Clear 扫除,清除Clone 克隆,复制Util 工具,龙套Components成分,组成Random 随意,任意Next Int 下一个整数Gaussian 高斯ArrayList 对列LinkedList链表Hash 无用信息,杂乱信号Map 地图Vector 向量,矢量Size 大小Collection收集Shuffle 混乱,洗牌RemoveFirst移动至开头RemoveLast 移动至最后lastElement最后的元素Capacity 容量,生产量Contains 包含,容纳Search 搜索,查询InsertElementAt 插入元素在某一位置第八章:io->in out 输入/输出File文件import导入exists存在isFile是文件isDirectory 是目录getName获取名字getPath获取路径getAbsolutePath 获取绝对路径lastModified 最后修改日期length长度InputStream 输入流OutputStream 输出流Unicode统一的字符编码标准, 采用双字节对字符进行编码Information 信息FileInputStream 文件输入流FileOutputStream文件输出流IOException 输入输出异常fileobject 文件对象available 可获取的read读取write写BufferedReader 缓冲区读取FileReader 文本文件读取BufferedWriter 缓冲区输出FileWriter 文本文件写出flush清空close关闭DataInputStream 二进制文件读取DataOutputStream二进制文件写出EOF最后encoding编码Remote远程release释放第九章:JBuiderJava 集成开发环境IDEEnterprise 企业版Developer 开发版Foundation 基础版Messages 消息格Structure 结构窗格Project工程Files文件Source源代码Design设计History历史Doc文档File文件Edit编辑Search查找Refactor 要素View视图Run运行Tools工具Window窗口Help帮助Vector矢量addElement 添加内容Project Winzard 工程向导Step步骤Title标题Description 描述Copyright 版权Company公司Aptech Limited Aptech有限公司author 作者Back后退Finish完成version版本Debug调试New新建ErrorInsight 调试第十章:JFrame窗口框架JPanel 面板JScrollPane 滚动面板title 标题Dimension 尺寸Component组件SwingJAVA轻量级组件getContentPane 得到内容面板LayoutManager布局管理器setVerticalScrollBarPolicy设置垂直滚动条策略AWTAbstract Window Toolkit 抽象窗口工具包GUI Graphical User Interface 图形用户界面VERTICAL_SCROLLEARAS_NEEDED当内容大大面板出现滚动条VERTICAL_SOROLLEARAS_ALWAYS显示滚动条VERTICAL_SOROLLEARAS_NEVER不显示滚动条JLabel标签Icon 图标image图象LEFT 左对齐RIGHT右对齐JTextField单行文本getColumns得到列数setLayout设置布局BorderLayout 边框布局CENTER居中对齐JTextArea多行文本setFont设置字体setHorizontalAlignment设置文本水平对齐方式setDefaultCloseOperation设置默认的关闭操作add增加JButton 按钮JCheckBox 复选框JRadioButton单选按钮addItem 增加列表项getItemAt 得到位置的列表项getItemCount 得到列表项个数setRolloverIcon 当鼠标经过的图标setSelectedIcon 当选择按钮的图标getSelectedItem 得到选择的列表项getSelectedIndex 得到选择的索引ActionListener按钮监听ActionEvent 按钮事件actionPerformed按钮单击方法附加.............可能有重复编程英语:手摘abstract 关键字抽象 'bstrktaccessvt.访问,存取 'kses'n.入口,使用权algorithmn.算法 'lgriemAnnotationjava 代码注释 nu'teinanonymousadj.匿名的'nnims'反义:directly adv.直接地,立即di'rektli, dai'rektli apply v.应用,适用 'plaiapplication n.应用,应用程序 ,pli'kein' application crash 程序崩溃arbitrarya.任意的 'ɑ:bitrriargument n.参数;争论,论据 'ɑ:gjumnt'缩写 argsassert 关键字断言 's:t ' java 之后成为关键字associaten.关联同伴,伙伴 'suieitattributen.属性品质,特征 'tribju:tboolean关键字逻辑的, 布尔型call .调用; 呼叫; k:lcircumstancen.事件环境,状况 's:kmstnscrash n.崩溃,破碎 krcohesion 内聚,黏聚,结合 ku'hi:na class is designed with a single, well-focoused purpose. 应该不止这点command n. 命令,指令 k'mɑ:nd指挥, 控制 command-line 命令行Comments java 文本注释 'kmentscompilejava v.编译 km'pail' Compilation n.编辑,kmpi'leinconst 保留字constant n. 常量, 常数, 恒量 'knstntcontinue 关键字coupling 耦合,联结 'kplimaking sure that classes know about other classes only through their APIs. declarejava 声明 di'kldefault关键字默认值; 缺省值 di'f:ltdelimiter定义符; 定界符Encapsulationjava 封装 hiding implementation detailsException java 例外; 异常 ik'sepnentry n.登录项, 输入项, 条目'entrienum关键字execute vt.执行 'eksikju:texhibit v.显示, 陈列 ig'zibitexist 存在, 发生 ig'zist 'SQL关键字 existsextends关键字继承、扩展 ik'stendfalse 关键字final 关键字 finally 关键字fragments段落; 代码块 'frgmntFrameWork java 结构,框架 'freimw:kGenericjava 泛型 di'nerikgoto保留字跳转heap n.堆 hi:pimplements关键字实现 'implimntimport 关键字引入进口,输入Info n.信息 information ,inf'meinInheritance java 继承 in'heritns 遗传,遗产initialize 预置初始化 i'nilaizinstanceof关键字运算符,用于引用变量,以检查这个对象是否是某种类型;返回 boolean 值; interface 关键字接口 'intfeisinvokevt.调用 in'vuk' invocation ,invu'keinIterator java 迭代器, 迭代程序legal 合法的 'li:gllogn.日志,记录 lgnative 关键字 'neitivnested java 嵌套的 'nestid '如:内部类nested classesObject java 对象 'bdektOverload java 方法的重载不同参数列表的同名方法 ,uv'ludOverride java 方法的覆盖覆盖父类的方法 ,uv'raidpolymiorphismjava 多态 polymorphism 多形性,pli'm:fizmallowing a single object to be seen as having many types.principlen.原则,原理,主义 'prinsiplpriority n. 优先级 prai'ritiprocess n. 程序, 进程 'prsesprotected 关键字受保护的,私有的 pr'tektidprovide v.规定供应,准备,预防pr'vaidrefer to v.引用 ri'f:tu:referencen. 参考引用,涉及'refrns' -->reference variable 参量, 参考变量,引用变量Reflectionjava 反射 ri'fleknscriptn.手写体,小型程序 skriptserialized vt.序列化,串行化 'sirilaiz'serializable adj.deserialize反序列化,反串行化Socket java 网络套接字'skitstack n.堆栈 stk 对应 heap 堆statement程序语句; 语句 'steitmnt' n. 陈述,指令subclass n.子类 'sbklɑ:s' supertype 父类switch 关键字选择语句; n.开关,道岔 switsynchronized 关键字同步锁 'sikrnaizThread java 线程θredthrow 关键字 throws 关键字θru 抛出异常transient 关键字瞬变;临时的'trnzint'可序列化valid 正确的,有效的 'vlidvariable n.变量 a.可变的'vriblvolatile 关键字不稳定的'vltailwhile 关键字循环语句; 当...的时候 hwailabstract 关键字抽象 'bstrktaccessvt.访问,存取 'kses'n.入口,使用权algorithmn.算法 'lgriemAnnotationjava 代码注释 nu'teinanonymousadj.匿名的'nnims'反义:directly adv.直接地,立即di'rektli, dai'rektli apply v.应用,适用 'plaiapplication n.应用,应用程序 ,pli'kein' application crash 程序崩溃arbitrarya.任意的 'ɑ:bitrriargument n.参数;争论,论据 'ɑ:gjumnt'缩写 argsassert 关键字断言 's:t ' java 之后成为关键字associaten.关联同伴,伙伴 'suieitattributen.属性品质,特征 'tribju:tboolean关键字逻辑的, 布尔型call .调用; 呼叫; k:lcircumstancen.事件环境,状况 's:kmstnscrash n.崩溃,破碎 krcohesion 内聚,黏聚,结合 ku'hi:na class is designed with a single, well-focoused purpose. 应该不止这点command n. 命令,指令 k'mɑ:nd指挥, 控制 command-line 命令行Comments java 文本注释 'kmentscompilejava v.编译 km'pail' Compilation n.编辑,kmpi'leinconst 保留字constant n. 常量, 常数, 恒量 'knstntcontinue 关键字coupling 耦合,联结 'kplimaking sure that classes know about other classes only through their APIs. declarejava 声明 di'kldefault关键字默认值; 缺省值 di'f:ltdelimiter定义符; 定界符Encapsulationjava 封装 hiding implementation detailsException java 例外; 异常 ik'sepnentry n.登录项, 输入项, 条目'entrienum关键字execute vt.执行 'eksikju:texhibit v.显示, 陈列 ig'zibitexist 存在, 发生 ig'zist 'SQL关键字 existsextends关键字继承、扩展 ik'stendfalse 关键字final 关键字 finally 关键字fragments段落; 代码块 'frgmntFrameWork java 结构,框架 'freimw:kGenericjava 泛型 di'nerikgoto保留字跳转heap n.堆 hi:pimplements关键字实现 'implimntimport 关键字引入进口,输入Info n.信息 information ,inf'meinInheritance java 继承 in'heritns 遗传,遗产initialize 预置初始化 i'nilaizinstanceof关键字运算符,用于引用变量,以检查这个对象是否是某种类型;返回 boolean 值; interface 关键字接口 'intfeisinvokevt.调用 in'vuk' invocation ,invu'keinIterator java 迭代器, 迭代程序legal 合法的 'li:gllogn.日志,记录 lgnative 关键字 'neitivnested java 嵌套的 'nestid '如:内部类nested classesObject java 对象 'bdektOverload java 方法的重载不同参数列表的同名方法 ,uv'ludOverride java 方法的覆盖覆盖父类的方法 ,uv'raidpolymiorphismjava 多态 polymorphism 多形性,pli'm:fizmallowing a single object to be seen as having many types.principlen.原则,原理,主义 'prinsiplpriority n. 优先级 prai'ritiprocess n. 程序, 进程 'prsesprotected 关键字受保护的,私有的 pr'tektidprovide v.规定供应,准备,预防pr'vaidrefer to v.引用 ri'f:tu:referencen. 参考引用,涉及'refrns' -->reference variable 参量, 参考变量,引用变量Reflectionjava 反射 ri'fleknscriptn.手写体,小型程序 skriptserialized vt.序列化,串行化 'sirilaiz'serializable adj.deserialize反序列化,反串行化Socket java 网络套接字'skitstack n.堆栈 stk 对应 heap 堆statement程序语句; 语句 'steitmnt' n. 陈述,指令subclass n.子类 'sbklɑ:s' supertype 父类switch 关键字选择语句; n.开关,道岔 switsynchronized 关键字同步锁 'sikrnaizThread java 线程θredthrow 关键字 throws 关键字θru 抛出异常transient 关键字瞬变;临时的'trnzint'可序列化valid 正确的,有效的 'vlidvariable n.变量 a.可变的'vriblvolatile 关键字不稳定的'vltailwhile 关键字循环语句; 当...的时候 hwailargument 参量 abstract 抽象ascent 提升 already 已经 AWTAbstract Window Toolkit抽象窗口工具 APIApplication Programming Interface应用程序接口B. byte 字节 Boolean 布尔 banana香蕉base 基础 buffer缓冲器 button 按钮 break 中断body 身体C. color颜色 class类 count计数 client客户 code代码calculation计算 cell单元 circle圆capital首都 catch捕获 check检查 container容器 component 组件 command 命令 cube立方,三次方 char=character字符 cancel取消 case 情况 choice选择 click单击 center 中心compile编译 clone克隆,复制 continue 继续 create建立D. draw 绘图 data数据 demo示例 DLLDynamic Link Library动态链接库 document 文档descent 继承 division 分裂,除法 define定义,说明 display显示E. error 错误 extends 扩展 executed 执行 event 事件 enter 输入,回车键 exception 异常except 除外 employee 雇员environment 环境 east 东方 equal 相等 Echo 重复F. false 假的 float 单精度型 fruit 水果 file 文件 find 发现found 发现 field 域 final 终结的 friend 朋友 fill 填充 focus 焦点font 字体 factorial 阶乘G. graphic 图像 grid 方格 GUI图形化用户接口 get 得到H. host 主机 height 高度I. init=initialize初始化 input 输入 implement 实现 instance 实例 io=input/output输出输入 interrupted 中断 int=integer整型 item元素 interface 接口 inner 内部的 import 导入index 索引image 图像J. Java 爪哇 JDKJava Development Kit Java开发工具 JSPJava Server Page Java服务页JVMJava Virtual Machine Java虚拟机K. Kit 工具L. language 语言 loop 循环 long 长整型 label 标签 layout 布局 list 列表 listener 收听者M. move 移动 menu 菜单 mode 模式 method 方法 metric 米的,公尺 motion 运动 manager 经理 main 主要的 msg=message 消息N. new 新的 number 数字 north 北方 null 空的 native 本地的O. override 过载 orange 橘子 output 输出 object 对象 out 外部的 oval 椭圆P. public 公共的 protected 保护的 private 私有的 property 属性 point 点 price 价格 problem 问题 package 打包,包裹 print 打印 path 路径 po;ygon 多边形 program 程序 prompt 提示parse 分析 press 按,压 panel 面板 paint 画Q. q无R. return 返回 runnable 可捕获的 radius 半径 round 环绕 release 释放 rect=rectangle长方形radio 无线电 resolve 解析S. short 短整型 south 南方的 string 字符串 static 静态的 system 系统 seed 种子 seasonal 季节的 set 设置 super 超级 square 平方,二次方 sub 替代的 screen 屏幕 sound声音 state 状态salary 薪水 sleep 睡觉 size 大小,尺寸 start 开始 sort 排序 status 状态 synchronize 同步发生switch 开关 stream 流 symbol 符号T. true 真的 title 标题 type 类型 temp=temporary暂时的 throw 扔 thread 线程 temperate 温度 tool 工具 try 试图U. undefined 未定义 UIUser Interface 用户接口 update 更新 URLUniform Resource Locator 统一资源定位器V. volatile 挥发性 visible 不可见的 virtual 虚拟的 variable 变量 value 数值 void 无返回值的 volume 列 viewer 观察者 vector 矢量●我喜欢「式」:constructor 建构式declaration 宣告式definition 定义式destructor 解构式expression 算式运算式function 函式pattern 范式、模式、样式program 程式signature 标记式签名式/署名式●我喜欢「件」:这是个弹性非常大的可组合字assembly 装配件component 组件construct 构件control 控件event 事件hardware 硬件object 物件part 零件、部件singleton 单件software 软件work 工件、机件●我喜欢「器」:adapter 配接器allocator 配置器compiler 编译器container 容器iterator 迭代器linker 连结器listener 监听器interpreter 直译器translator 转译器/翻译器●我喜欢「别」:class 类别type 型别●我喜欢「化」:generalized 泛化specialized 特化overloaded 多载化重载●我喜欢「型」:polymorphism 多型genericity 泛型●我喜欢「程」:process 行程/进程大陆用语thread 绪程/线程大陆用语programming 编程●英中繁简编程术语对照英文繁体译词有些是侯捷个人喜好,普及与否难说大陆惯用术语--------------------------------------------------------------------------------------- define 定义预定义abstract 抽象的抽象的abstraction 抽象体、抽象物、抽象性抽象体、抽象物、抽象性access 存取、取用存取、访问access level 存取级别访问级别access function 存取函式访问函数activate 活化激活active 作用中的adapter 配接器适配器address 位址地址address space 位址空间,定址空间address-of operator 取址运算子取地址操作符aggregation 聚合algorithm 演算法算法allocate 配置分配allocator 空间配置器分配器application 应用程式应用、应用程序application framework 应用程式框架、应用框架应用程序框架architecture 架构、系统架构体系结构argument 引数传给函式的值;叁见 parameter 叁数、实质叁数、实叁、自变量array 阵列数组arrow operator arrow箭头运算子箭头操作符assembly 装配件assembly language 组合语言汇编语言assertion 断言assign 指派、指定、设值、赋值赋值assignment 指派、指定赋值、分配assignment operator 指派赋值运算子 = 赋值操作符associated 相应的、相关的相关的、关联、相应的associative container 关联式容器对应 sequential container 关联式容器atomic 不可分割的原子的attribute 属性属性、特性audio 音讯音频. 人工智慧人工智能background 背景背景用於图形着色後台用於行程backward compatible 回溯相容向下兼容bandwidth 频宽带宽base class 基础类别基类base type 基础型别等同於 base classbatch 批次意思是整批作业批处理benefit 利益收益best viable function 最佳可行函式最佳可行函式从 viable functions 中挑出的最佳吻合者binary search 二分搜寻法二分查找binary tree 二元树二叉树binary function 二元函式双叁函数binary operator 二元运算子二元操作符binding 系结绑定bit 位元位bit field 位元栏位域bitmap 位元图位图bitwise 以 bit 为单元逐一┅bitwise copy 以 bit 为单元进行复制;位元逐一复制位拷贝block 区块,区段块、区块、语句块boolean 布林值真假值,true 或 false 布尔值border 边框、框线边框bracecurly brace 大括弧、大括号花括弧、花括号bracketsquare brakcet 中括弧、中括号方括弧、方括号breakpoint 中断点断点build 建造、构筑、建置MS 用语build-in 内建内置bus 汇流排总线business 商务,业务业务buttons 按钮按钮byte 位元组由 8 bits 组成字节cache 快取高速缓存call 呼叫、叫用调用callback 回呼回调call operator call函式呼叫运算子调用操作符同 function call operatorcandidate function 候选函式候选函数在函式多载决议程序中出现的候选函式chain 串链例 chain of function calls 链character 字元字符check box 核取方块 . check button 复选框checked exception 可控式异常Javacheck button 方钮 . check box 复选按钮child class 子类别或称为derived class, subtype 子类class 类别类class body 类别本体类体class declaration 类别宣告、类别宣告式类声明class definition 类别定义、类别定义式类定义class derivation list 类别衍化列类继承列表class head 类别表头类头class hierarchy 类别继承体系, 类别阶层类层次体系class library 类别程式库、类别库类库class template 类别模板、类别范本类模板class template partial specializations类别模板偏特化类模板部分特化class template specializations类别模板特化类模板特化cleanup 清理、善後清理、清除client 客端、客户端、客户客户client-server 主从架构客户/服务器clipboard 剪贴簿剪贴板。

java代码 英汉小词典

import java.awt.*;import .*;import java.sql.*;import java.awt.event.*;import java.io.*;import java.util.Calendar;class DataWindow extends Frame implements ActionListener{ TextField searchWord_tField,expWord_tField,searchChineseField,expEnglishField,updWord_tField,updExpWord_tField,addNewWord_tField,addExpWord_tField;Button search_button,update_button,add_button,searchChinese_buton;int search_record=0;Connection Con=null;Statement Stmt=null;DataWindow(){ super("英汉小词典");setBounds(150,150,600,400);setVisible(true);message_log("DataWindow Start : ");try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");}catch(ClassNotFoundException e){}try{Con=DriverManager.getConnection("jdbc:odbc:data","lixuanxian","123");Stmt=Con.createStatement();message_log("Stmt="+Stmt);}catch(SQLException ee) {}searchWord_tField=new TextField(16);expWord_tField=new TextField(16);searchChineseField=new TextField(16);expEnglishField=new TextField(16);updWord_tField=new TextField(16);updExpWord_tField=new TextField(16);addNewWord_tField=new TextField(16);addExpWord_tField=new TextField(16);searchChinese_buton=new Button("确定");search_button=new Button("查询");update_button=new Button("更新");add_button=new Button("添加");Panel p1=new Panel(),p2=new Panel(),p3=new Panel(),p4=new Panel(),pset=new Panel(new GridLayout(5,2));p1.add(new Label("输入要查询的英语单词:"));p1.add(searchWord_tField);p1.add(new Label("显示英语单词的汉语解释:"));p1.add(expWord_tField);p1.add(search_button);p4.add(new Label("输入要查询的汉语:"));p4.add(searchChineseField);p4.add(new Label("显示英语单词的英文解释:"));p4.add(expEnglishField);p4.add(searchChinese_buton);p2.add(new Label("输入英语单词:"));p2.add(updWord_tField);p2.add(new Label("输入该单词更新的汉语解释:"));p2.add(updExpWord_tField);p2.add(update_button);p3.add(new Label("输入英语单词:"));p3.add(addNewWord_tField);p3.add(new Label("输入汉语解释:"));p3.add(addExpWord_tField);p3.add(add_button);pset.add(p1);pset.add(p4);pset.add(p2);pset.add(p3);add(pset);search_button.addActionListener(this);update_button.addActionListener(this);add_button.addActionListener(this);searchChinese_buton.addActionListener(this);addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e){ setVisible(false);System.exit(0);}});}public void actionPerformed(ActionEvent e){if (e.getSource()==search_button){search_record=0;try { query();}catch (SQLException ee) {}}else if (e.getSource()==update_button){try { modify();}catch (SQLException ee) {}}else if (e.getSource()==add_button){try { addNew();}catch (SQLException ee) {}}else if (e.getSource()==searchChinese_buton){try { queryChinese();}catch (SQLException ee) {}}}public void query() throws SQLException{message_log("query start");String cname, ename,text="'"+searchWord_tField.getText().trim()+"'";Con=DriverManager.getConnection("jdbc:odbc:data","lixuanxian","123");message_log("Con="+Con);ResultSet rs=Stmt.executeQuery("SELECT * FROM dict where English="+text);int n=0;message_log("in query : n="+n);while (rs.next()){message_log("while start " );ename=rs.getString("English"); cname=rs.getString("Chinese");message_log(ename+" "+cname);if(ename.trim().equals(searchWord_tField.getText().trim())){message_log("equal");message_log("in query : ename="+ename+" cname="+cname);expWord_tField.setText(cname);search_record=1;break;}message_log("not equal");}if(search_record==0){expWord_tField.setText("没有该单词");}}public void queryChinese() throws SQLException{message_log("queryChinese start");String cname, ename,text="'"+searchChineseField.getText().trim()+"'";Con=DriverManager.getConnection("jdbc:odbc:data","lixuanxian","123");message_log("Con="+Con);ResultSet rs=Stmt.executeQuery("SELECT * FROM dict where Chinese="+text);int n=0;message_log("in query : n="+n);while (rs.next()){message_log("while start " );ename=rs.getString("English"); cname=rs.getString("Chinese");message_log(cname+" "+ename);if(cname.trim().equals(searchChineseField.getText().trim())){message_log("equal");message_log("in query : cname="+cname+"ename="+ename);expEnglishField.setText(ename);search_record=1;break;}message_log("not equal");}if(search_record==0){expEnglishField.setText("没有该词语");}}public void modify() throws SQLException{message_log("modify start");String s1="'"+updWord_tField.getText().trim()+"'",s2="'"+updExpWord_tField.getText().trim()+"'";String temp="UPDATE dict SET Chinese=" +s2+" WHERE English= "+s1;Con=DriverManager.getConnection("jdbc:odbc:data","lixuanxian","123");Stmt.executeUpdate(temp);updWord_tField.setText(null);updExpWord_tField.setText(null);Con.close();}public void addNew() throws SQLException{message_log("addNew start");String s1="'"+addNewWord_tField.getText().trim()+"'",s2="'"+addExpWord_tField.getText().trim()+"'";String temp="INSERT INTO dict VALUES("+ s1+", "+s2+")";Con=DriverManager.getConnection("jdbc:odbc:data","lixuanxian","123");Stmt.executeUpdate(temp);addNewWord_tField.setText(null);addExpWord_tField.setText(null);Con.close();}public void message_log(String msg){try {java.util.Date RightNow = Calendar.getInstance().getTime();java.text.SimpleDateFormat LOG_FILENAME_SDF=new java.text.SimpleDateFormat("yyyyMMdd");java.text.SimpleDateFormat SMS_LOG_DETAIL_TIME=new java.text.SimpleDateFormat("yyyy/MM/dd HH:mm:ss ");// get the Log File LocationFileOutputStream fos;fos = new FileOutputStream("F:\\李选贤\\java\\英汉小词典\\log\\"+LOG_FILENAME_SDF.format(RightNow) + "_Database.log" ,true);PrintWriter pw = new PrintWriter(fos);pw.print(SMS_LOG_DETAIL_TIME.format(RightNow));pw.println(" " + msg);pw.close();fos.close();} catch (Exception ex) {System.out.println(msg);System.out.println("SMSMsgLog: Error \r\n"+ex.getMessage());ex.printStackTrace();}}}public class dictionary{public static void main(String args[]){DataWindow window1=new DataWindow();window1.pack();}}。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档