Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

December 23, 2010

Basics Of Java

Java was designed to allow secure execution of code across network. To make Java secure many of the features of C and C++ were eliminated. Java does not use Pointers. Java programs cannot access arbitrary addresses in memory.

ref http://www.javabeginner.com/learn-java/introduction-to-java-programming


  • JSP, or Java Server Pages, use a form of Java code embedded in standard HTML tags to create dynamic web pages. Similar to PHP and ASP. 

  • Java Applets are another type of program used on the internet. Applets, or a small program that is executed from within a web page, can bring many new uses to a web browser. Things like chat clients, instant messaging, complex calculations, and much more are commonly handled by Applets. 


  • Simple Program:

    class Hello { public static void main (String[] args) { System.out.println("Welcome to the world of Java Programming."); } // method main } // class Hello

    To compile and run this program, you need to have installed JDK and added a line to your path statement referring to the directory of where it was install + \bin. (e.g. path %path%;c:\jdk\bin;)
    • type this file into notepad or something
    • save it as Hello.java(class name + .java)
    • drop to a command prompt
    • type javac Hello.java (e.g. "javac C:\work\Hello.java")
    • type java Hello (e.g. "java C:\work\Hello")

    COALESCE-SQL

    Coalesce- return the null values from the expression. It works similar to a case statement where if expression 1 is false then goes to expr...