`
sasipa90
  • 浏览: 14592 次
  • 性别: Icon_minigender_1
  • 来自: 长沙
最近访客 更多访客>>
社区版块
存档分类
最新评论

Java Keywords

阅读更多
JAVA Keywords
=============

Keywords in Java are words  or expressions used to declare an expression, method or return value.
About the number of those keywords some say that there are 48, some 50, some others 52.
Here we have 51;There are:

byte, boolean, break, case, char, continue, float, for, if, else, import, int,interface, long, new, package, private, protected, public, return, short, this, void, abstract, assert, catch, class, const, default, do, enum, extends, final, finally, goto, instanceof,  native, static, strictfp, super,switch, synchronized, throw, throws, transient, try, volatile, while, false, true, null.


Here we will just give and try to explain some of them.
We will beggin by the most common used:


- byte: Is used to return a 8-bit value;
- boolean : Used to return a boolean value(true or false);
- break: Used to stop immediately the execution of a statement;
- case: Used to declare individual cases of statements;
- char: Is used to return a 16-bit unicode value;
- continue: used to resume a current loop;
- extends : Used in interface;
- final: Used for expression which cannot be changed, a final class
  cannot be subclassed, a final method cannot be overriden, a final 
  variable can occur at most once.
- float : Is used to return a 32-bit value;
- for: Used to create a loop using some conditions;
- if -else: Used when we need to verify if the statement is true or 
  false.it will run if it is true, block the statement if it is false;
- implements : Used in interface;
- import: As the meaning of the name, used to import some classes,
  function without using the whole package;
- int: Is used to return a value of type int which means a value
  which has 32 bits;
- interface: Used to declare a special class that will be used by
  implementation or extends. That class only contain abstracts methods
- long: Is used to return 64-bit value;
- new: Used to create a obect, an array
- package: "package" is a group of  types (classes, enum, interface);
- private: The "private" keyword is also used in declaration of
  function, classes and means that the element can only be used by
  the class which contain it. A private function from an inherit  
  father class can't be used in a subclass;
- protected: The use of "protected"  keyword is the same as the one 
  of "private" on the difference that it can only be used by the
  variable or function in the same package, class or function;
- public:  The "public" keyword is used in declaration of functions,
  classes and means that the class (function) can be used by every
  other class in the same package;
- return: Is used to finish a execution of a method and will be
  followed by a particle which needs to be to be called at the end of
  the execution;
- short: Is used to return 16-bit value;
- static: a static function can be run directly by the class without
  creating an object. static obecjts can alse be used by other
  classes in this format(classname.objectname);
- super: will call a method from an inherit parent class;
- this: Used to give a relationship between a function and a variable
- void: Is used to declare a function tahat doesn't return any value;
- false: Used in boolean to mean that a statement is false;
- true: Used in boolean to mean that a statement is true;
- null: Which means without value,
- while: Used to create a loop which use the boolean expression.
分享到:
评论

相关推荐

    java 获取数据库对SQL支持的信息

    在Java编程中,获取数据库对SQL支持的信息是开发数据库应用时常见的需求,这涉及到JDBC(Java Database Connectivity)API的使用。JDBC是Java中用于与各种类型数据库交互的一组接口和类,它允许程序员使用标准的Java...

    Core Java 9th Edition(Vol1,Vol2)

    Java Keywords Volume I: Streams and Files Networking Database programming XML JNDI and LDAP Internationalization Advanced GUI components Java 2D and advanced AWT JavaBeans Security RMI ...

    软件编程词汇表(一些编程词汇的解释)

    Java 关键字 (Java Keywords) Java关键字是编程语言中具有特殊含义的单词,不能用作标识符。Java的关键字包括`if`、`else`、`while`、`class`、`public`等。关键字用于定义语法规则,如控制流、类型声明等。 #### ...

    解决MYSQL中文乱码

    keywords = new String(request.getParameter("keywords").getBytes("8859_1"), "GB2312"); ``` 4. **数据库创建和修改**: 如果已有乱码数据,可以尝试修改已有的数据库、表或字段的字符集。在 MySQL 中,可以...

    课程 Java程序设计 3 - Identifier Keywords Types (怀旧版)

    本课程“Java程序设计3 - Identifier Keywords Types”旨在帮助学习者理解和掌握这些核心概念。 首先,标识符(Identifier)是编程中用于命名变量、类或方法的符号。在Java中,一个有效的标识符可以以Unicode字母、...

    Java Syntax BNF_java_

    2. **关键字(Keywords)**:Java有一些预定义的关键字,如`public`, `private`, `protected`, `static`, `final`, `void`, `int`, `if`, `else`, `while`, `for`, `return`等,它们有特殊的语义,不能用作标识符。...

    java比较时间前后

    在Java编程语言中,比较时间前后是一个非常实用且常见的需求,尤其是在处理日期和时间相关的业务逻辑时。本文将详细介绍如何在Java中实现时间的比较,并给出具体的代码示例以及一些扩展应用。 ### Java中比较时间的...

    Java The Complete Reference ,11th Edition.pdf

    Best-selling programming author Herb Schildt covers the entire Java language, including its syntax, keywords, and fundamental programming principles. You’ll also find information on key portions of ...

    Java A Beginners Guide 7th Edition 1259589315.pdf

    It then discusses the keywords, features, and constructs that form the core of the Java language. You’ll also find coverage of some of Java’s most advanced features, including multithreaded ...

    Java: A Beginner's Guide 5th Edition

    Standard Edition 7 (Java SE 7), Java: A Beginner's Guide, Fifth Edition starts with the basics, such as how to compile and run a Java program, and then discusses the keywords, syntax, and constructs ...

    java 变量、关键字

    #### 一、关键字(Keywords) **1. 关键字概述** Java的关键字对编译器具有特殊的意义,它们用来表示特定的数据类型或程序结构等。关键字不能用作变量名、方法名、类名或包名。 **2. 常见的关键字** Java中有许多...

    java-jls8.pdf

    此外,还介绍了输入元素和标记(Input Elements and Tokens)、空白(White Space)、注释(Comments)、标识符(Identifiers)、关键字(Keywords)以及各种字面量(Literals)的定义和用法,包括整数字面量...

    Java防止SQL注入的几个途径

    this.inj_str = filterConfig.getInitParameter("keywords"); } public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { ...

    Java开发编码规范手册

    **Keywords (关键字)**:关键字是编程语言中具有特殊意义的词汇,不能作为标识符使用。 **Constant (常量)**:常量是在程序执行期间其值不会发生变化的量。 **Variable (变量)**:变量是用来存储数据的容器,可以...

    java名词速查表 java名词速查表

    #### Keywords (关键字) - 关键字是Java语言中保留的词汇,具有特殊的含义。 - **示例**:public、private、protected、void、int等。 #### Layout managers (布局管理器) - 布局管理器用于管理GUI组件的排列和...

    java基础知识(适合新手入门)

    * 关键字(keywords)定义:是由 Java 语义定义的、具有特殊含义的单词。 * 分隔符(separator):用于分开两个语法的成分。 七、基本数据类型 * 什么是数据?数据是描述客观事物的数字、字符以及所有能输入到...

    java实现获取网站的keywords,description

    下面我们将详细讲解如何使用Java和jsoup来获取网站的keywords和description: 1. 引入jsoup库 在你的Java项目中,你需要引入jsoup的相关依赖。如果你使用的是Maven,可以在pom.xml文件中添加以下依赖: ```xml ...

    java插入数据乱码解决集锦

    keywords=" + java.net.URLEncoder.encode(keywords, "UTF-8")`。 2. 在接收端解码参数,如`String keywords = new String(request.getParameter("keywords").getBytes("ISO-8859-1"), "UTF-8")`。 #### 三、...

    2. 尚硅谷_佟刚_Java基础_Java基本语法

    关键字(Keywords) - **定义**: 在Java中,关键字是指那些被赋予特殊意义的字符串,用于特定的编程功能或结构。 - **特点**: - 所有关键字均由小写字母组成。 - 不允许作为自定义标识符使用。 #### 2. 标识符...

    java 文本学习资料

    这部分主要包含文档元信息,如标题、字符集设置(CHARSET)、页面描述(DESCRIPTION)、关键词(KEYWORDS)等,这些信息对搜索引擎优化(SEO)以及浏览器理解和展示页面至关重要。 接下来,1.3章节重点讲解中的各种...

Global site tag (gtag.js) - Google Analytics