Showing posts from July, 2011

What are new features in Java 7 or JDK7?

I was looking at all new features of Java 7. List of features include to simplify common, day-to-day programming tasks: Strings in switch statements, try-with-resources statements, improved type inference for generic instance creation ("diamond" or "<>"), simplified varargs method invocation, better integral literals, improved exception handling (multi-catch), and my favorite feature fork-join framework. I found many blog posts mentioning them. I developed following simple examples to demonstrate all new JDK7 features. Click on following links to see the example code and its detailed explanation:

JDK7 feature's list of examples:
An example of new feature in JDK 7 which can do type inference for generic instance creation.Try-with-resources statementString object is allowed in switch-case statementCatch multiple exceptions in a single catch block & more precise exception re-throw exampleExpress literal values in binary with prefix '0b' (or '…

Getting started with Android application development

Many Java developers have shown their interest in Android application development but they don't know where to start. Few are planning to join Android training in some training institute. I advice not to do that. Internet is your best teacher. That is the way, I started learning Android.

Following are few links which I started reading to understand Android platform. These links will give you good idea about Android basics and help you setup Android development environment using Eclipse IDE:

Why do I get missing "use strict" statement error when I run my java script code through Crockford's JSLint?

Strict Mode is a new feature in ECMAScript 5 that allows you to place a program, or a function, in a "strict" operating context. This strict context prevents certain actions from being taken and throws more exceptions. Strict mode helps out in a couple ways:
It catches some common coding bloopers, throwing exceptions.It prevents, or throws errors, when relatively "unsafe" actions are taken (such as gaining access to the global object).It disables features that are confusing or poorly thought out.Also note you can apply "strict mode" to the whole file... Or you can use it only for a specific function. Conclusion is it helps you make fewer errors, by detecting more things that could lead to breakages.

You can also look at article about that : John Resig - ECMAScript 5 Strict Mode, JSON, and MoreYou can try JSLint (The JavaScript Code Quality Tool) online by visiting: looks pretty interesting too: http…