Javascript  
 
  ScriptJava  
 
  Perl  
 
  PHP  
 
  ROR  
 
  ask us  
 

 

Applications
  1. Getting started
  2. Definitions
  3. First program
  4. Characters and Strings
  5. Object and methods
  6. Arrays and Circles
  7. Exceptions
  8. The main method
  9. Reading
  10. Writing file
  11. Vectors
  12. Stacks
  13. Map The Dictionary
  14. Lists
  15. Linked lists
  16. Collection
  17. Interfaces
  18. Scanner
  19. StringTokenizer
  20. Generics
  21. JDBC
  22. DataBase Queries
  23. JSP, The main step

Graphics

Applets
  1. Regards
  2. One Picture
  3. Calculator
  4. Random pictures
  5. Bouncing picture

Swings
  1. Buttons listeners
  2. TextFields
  3. Swing Example

JavaBeans
  1. The first step
  2. Example

Search a word:
   



© The scientific sentence. 2010

Definitions
Definitions

class : set of variables, constructors and methods. A class holds a name that it will be compiled as javac name.java and executed as java name (with JDK : java Developpement Kit compiler).

Concstructor: a function, with the same name as the class (name (...)), and that contains or not the declared variables. These variables will be used to construct the object of the class.

Method: a function or a procedure that manipulate the object. In this case, the method is satatic. If it doesn't deal with the object it is not static.

Variable: If a variable deals with the object, then it's a variable object. If not, it's then a class variable.

Field: All the separated members of the class holding data of the object or the class are called fields.

Instance: An istance is the fresh duilt object: the related sytax is: Constructor Instance = new Constructor(...); A class is instantiated when its constructor is called. Making an object is equivalent to create an instance of a class. Instance variable and instance methods are the variable and methods used when an instance is declared.

Modifiers (access modifiers): To set visibilty, a the name of class may be preceded by a modifier such as:
- public: visible from everywhere. In the directory (or package), where it is made, a class can be compiled and executed without the public modifier. The related fields followa the same rule.
- private: Fields (variables or methods) may be used only by an instance of the same class. This class which declares the variable or method,
- protected: Field are available to all subclasses of the class and all the classes in the same package.
Without any access modifier, the related class becomes a default class.
NB. main mehod must be always public. Class is either public
abstract. Fields are public, private or protected.

Type: Describes the kind of a variable or method like int, double, boolean, String, Object,.... A method (function) that returns nothing takes void as type.

extends: A class extends (inherits) from its super (mother) class, but it implements another class which is abstract ( with all fields abstract). A class can extends one class and implements many classes from the set called Interface. An abstarct class cannot be instantiated.

static: Field associated with a class rather than an object. Static fields are attached to a class, not an object.

final: Field that can not be changed. A class is declared as final if it can not be extended.


  
Google
Web
ScientificSentence
 




chimie labs
|
scientific sentence
|
java
|
php
|
green cat
|
contact
|


© Scientificsentence 2009. All rights reserved.