Skip to main content

Posts

Showing posts from January, 2014

New features in java 7

New features in Java 7 Binary Literals Strings in switch Statements The try-with-resources Statement Handling Multiple Exception Types Rethrowing Exceptions with Improved Type Checking   Type Inference for Generic Instance Creation  New object utils class  1. Binary Literals In Java SE 7, the integral types ( byte ,  short ,  int , and  long ) can also be expressed using the binary number system. To specify a binary literal, add the prefix   0b  or  0B  to the number. The following examples show binary literals: // An 8-bit 'byte' value: byte aByte = (byte)0b00100001; // A 16-bit 'short' value: short aShort = (short)0b1010000101000101; // Some 32-bit 'int' values: int anInt1 = 0b10100001010001011010000101000101; int anInt2 = 0b101; int anInt3 = 0B101; // The B can be upper or lower case. // A 64-bit 'long' value. Note the "L" suffix: long aLong = 0b1010000101000101101000010100010110100001010001011010000101000101L;  

Developing Portlets - Portlet Basics

Abstract   Abstract Learn about portlets from a user's and an application developer's perspective. View a brief comparison between a portlet and a servlet and understand basic portlet concepts; know the effect of Java 2 security enablement on the operation of portlets that rely on certain privileges for processing. -------------------------------------------------------------------------------------------- Portlets are reusable Web modules that run on a portal server and provide access to Web-based content, applications, and other resources. Companies can create their own portlets or select portlets from a catalog of third-party portlets. Portlets are intended to be assembled into a larger portal page, with multiple instances of the same portlet displaying different data for each user. From a user's perspective, a portlet is a window on a portal site that provides a specific service or information, for example, a calendar or news feed. From an appli