Register | Log in | RSS channel for codegravity.com homepage Bookmark!

284/2NEW projects | 71 services | 215 websites | 834/3NEW freelancers | 2126 topics | advertise



Login:



Forgot your password?
Forgot your username?
Create an account
JoomlaWatch Agent

Users

Most active users today from total of 109:
Peerke, garikello, jakkrit, dayanand, andrew_saber, giakhanh, mohalb, carmachhh, fguyon, dfireablaze, phoeker, ozedfr, boho, ashish_php, blackie, amoluca, JDev, tinytim007, Pascale, mayas_salman


19.9%United States United States
17.9%India India
9.3%Germany Germany
5.5%Russian Federation Russian Federation
4.4%United Kingdom United Kingdom
4.3%France France
4%Australia Australia
3.8%Netherlands Netherlands
3.8%Poland Poland
3.7%Italy Italy

Today: 976
Yesterday: 1402
This Week: 5266
Last Week: 8869
This Month: 2378
Last Month: 37593
Total: 117058


Partners:

HTML5, CSS3, SVG, tutorials

Freelance ColdFusion, Flex, PHP

Olejomalby, abstraktne obrazy

Camping Europe

WinAsm Studio

Vyšné Ružbachy

Sochy, Reštaurovanie

R.E.M.

Valid XHTML 1.0 Transitional

RSS feed:

Statistics:
Search Engine Genie Promotion Widget
Home

Java certification - fundamentals

Keywords are special reserved words in Java that you cannot use as identifiers (names) for classes, methods, or variables. Access Modifiers
  • private - accessible only from within it's own class
  • protected - only to classes in the same package or subclasses of the class.
  • public - from any other class
Class, methods, and variable modifiers
  • abstract - cannot be instantiated, must be implemented by a nonabstract subclass.
  • class - keyword that specifies a class
  • extends - indicates the superclass that a suclass is extending
  • final - impossible to extend a class, override a method, or reinitialize a variable
  • implements - indicates the interfaces that a class implements
  • interface - specifies the interface
  • native - a method is written in a platform-dependent language
  • new - instantiating, invoking the constructor
  • static - variable belong to a class as opposed to an instance
  • strictfp - will follow FP-strict rules in all expressions
  • synchronized - method can be accessed only by one thread
  • transient - prevents fields from ever being serialized
  • volatile - may change out of sync
Flow Control
  • break - exits from the block of code in which it is
  • case - executes a block of code, dependent on the switch
  • continue - begins the next iteration of the loop
  • default - executes if none of the switch-case statements match
  • do - conjuction with the while statement
  • else - if an if test is false
  • for - conditional loop for a block of code
  • if - logical test for true or false
  • instanceof - whether an object is an instance of a class, superclass, or interface
  • return - returns from method
  • switch - variable to be compared with the case statements
  • while - repeats while a certain condition is true
Error Handling
  • catch - declares the block to handle an exception
  • finally - is executed no matter what program flow occurs
  • throw - used to pass an exception
  • throws - indicates the method will pass an exception
  • try - block that will be tried, and which may cause an exception
  • assert - evaluates an expression to verify the assumption of the programmer
Package control
  • import - statement that says which packages or classes to import
  • package - specifies the package to which the sourcecode belongs
Primitives
  • boolean - a value true or false
  • byte - 8-bit signed integer
  • char - unicode character (16-bit)
  • short - 16-bit integer which is signed
  • double - 64-bit floating-point number which is signed
  • float - 32-bit floating-point number which is signed
  • int - 32-bit integer number which is signed
  • long - 64-bit integer which is signed
Variable keywords
  • super - refers to the superclass
  • this - refers to the current object
Void return type
  • void - indicates no return type
Unused reserved words
  • const - use public static final instead
  • goto - not implemented !
null, true and false are technically not keywords, but literal values ! Range of the primitives Six number types in Java are signed. The positive range is one less than the negative range. Zero is stored as a positive binary number. Boolean can be only true or false. Most of the ranges are virtual-machine depentent. The char type is a single unsigned 16-bit Unicode character. A primitive literal - is a source code representation of the primitive data types. Integer literals There are three ways how to write an integer primitive: as a
  • decimal
  • octal - by placing the zero in front of the number (up to 21 digits)
  • hexadecimal - by the prefix 0x or the optional suffix extension L (up to 16 digits)
Floating point defined as double (64 bits) by default. If you want to use the float, you must attach the suffix F or f to the number. You may also also attach a D or d to touble literals, but it's not necessary. Boolean literals can only be defined as true or false. Character literals char literals are represented by a single character in single quotes. You can use the escape code like \n for a new line. Literal values for Strings strings are not primitives, they can be represented as literals (typed directly into the code) Arrays are objects that store multiple variables of the same type. There are three important steps:
  • make an array reference (declaration) eg. int test[]; It is recommended to put the brackets after the type.
  • construct the array object eg.
  • initialize the array
 

Comments  

 
0 #1 prasad 2008-05-30 07:12
very good
Quote
 

Add comment


Security code
Refresh

No Tweets

Add URL of a programming website
register as a freelancer
submit your project
open freelance projects you can work on
webmaster resources
write paid blog posts about programming - tips and articles
bugs and features

Recommended: (advertise)
Download Joomlawatch 1.2.12



Freelancers, create paid articles
-
Looking for freelancers with experiences in Java to write paid articles on their experiences

Green Geeks Hosting -
World's best selling green web hosting


Advertise Here
-
Promote your services and get the new customers from the community of webmasters / programmers visiting CodeGravity.com

FastDomain.com -
Fast Domain hosting. Hostmonster alternative. Also for $6.95/month.


Outsource your project
-
Submit your project description with all the requirements to more than 600 freelancers from around the world for FREE.

Register as a Freelancer -
Submit your project experiences, programming languages and your other skills

HostMonster.com -
best cheap Joomla Web hosting. Website joomlawatchdemo.com is hosted by them with domain for $6,95/mo.



News from Twitter:
No Tweets
RSS Feeds:new

rss Freelance
rss Projects
rss Forum
rss Resources

Popular:
MathGuard
download mathguard
Random screenshot:

linoopz15.jpg


Poll

At what price would you purchase JoomlaWatch ad-free license?
 
Privacy policy | Advertise | Donate | Doucovanie Nemcina
Joomla Visitors Google Map
Loading map...
Joomla Visitors Google Map
Visitors Google Map Agent

Locations of visitors to this page


©2003-2010 Codegravity.com