java documentation

Upload: abhinav-arora

Post on 06-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Java Documentation

    1/4

    Java Documentation1)Scrabblet:-

    It is a kind of java program. It having the concept of Applet (Client side

    programming) / Servlet (Server side programming) & network programming. It is a multiplayer gam

    It having support for both, the keyboard & the mouse. After creation of this program the user canunderstand the concept of client side programming and server side programming. The server side

    programming must be in running in background to execute the client side programming.

    For detail:- Write the Servlet / Applet Life Cycle & about networking

    Applet life cycle

    init() start() repaint() update() paint() stop() destroy()

    Servlet life cycle

    Class file loading init() service() destroy() garbage collector.

    Loading & garbage collector servlet engine. (in web server )

    2)Lavatron:-

    It is a kind of java Application. This application works like a Light bulb display in the sportfield(Generally used in cricket field to display the wicket or score). This is a kind of simple applet

    having some good graphical effects with the images. Naturally for the animation or for lighting effec

    Threading concept are there. This concept implements without repaint() method. in Lavantron applewe have small images such as 6*6 , 8*8 px , 10 * 10 px or 12 * 12 px.

    3)ImageMenu:-It is a kind of java application generally used with web pages. It present image based menu

    with arbitrary number of choices in a vertical/horizontal list. When the user moves the mouse cursor

    over those choices the one under the cursor changes appearance, indicating that it can be clicked on.When the user clicks on a choice the web browser changes to a new document specified for that

    choice. It is a kind of applet program.

    4)Dynamic BillBoard:

    It is a kind of java program . It is an applet application. It displays the sequence

    Of images by repeatedly changing the image on the screen to another after a period of time. It is just

    like Banner component of the web pages. It also use the concept of multithreading.

    For above detail write Life Cycle of Applet & about Thread

    5)Migrating from C++ to JAVA:

  • 8/3/2019 Java Documentation

    2/4

    Java is a kind of programming language for internet computing & completely written in C++.

    That means the java is a kind of application developed in C++.

    List of C++ features not supported by java:-

    1)In java there is no any concept ofpointerdue to the security reason.

    2)It does not support theStructure & union .3)Java has no concept ofpre processor directives.4)It does not support automatic type casting.

    5) Java does not support default argument6)It does not support Multiple inheritence7)It does not support Destructor

    8)It does not support goto

    9)It does not have the delete method10)Operator overloading is not present

    Features of Java that is not in C++:-

    1)Platform Independency2)Multithreading

    3)Interface4)Package

    5)The char data type 16 bit wide Unicode char.

    6)Server side programming

    7)Database connectivity (more complex in C++)8)Remote method calling.

    Java beans it is a kind of reusable software components , just like active x control of Microsoft.

    Or

    It is a visual tool provided by the sun Microsystem just like visual tool of Microsoft.

    Individual java beans will vary in the functionally they support, but the typical unifying features that

    distinguish a java bean are:

    * support for"introspection" so that a builder tool can analyze how a bean works.

    * support for"customization" so that when using an application builder a user can

    customize the appearance and behavior of a bean* Support for"event" as a simple communication metaphor then can be used to connect

    up beans.

    * Support for"properties", both the customization and for programmatic use.* support forpersistence, so that a bean can be customized in an application builder and

    then have its customized state saved away and reload later.

    Adv

    1 Reusability.

    2 GUI Tool - Easy to use (Drag & drop).

    3 code auto generate4 auto compile.

  • 8/3/2019 Java Documentation

    3/4

    Dis. Adv

    1 code size very large 1 page 10 20 25 - 30 pages

    2 - no of files more 1 file 10 20 25 files3 limitation

    can do Simple form , Drawing , Animation , events.

    Cant do Frame , Dialog , Swing , file Handling , JDBC , Networking , RMI ,servlet .

    4- Performance Slow.

    Bean box collection of java beans (Designing Window).

    JAR files (Java Archive file) it is a kind of javas compressed file , bean box accept only jar filefor each & every java beans stored inside jars sub folder of BDK.

    JAR Files Auto Executable Non Auto Executable

    Open on DBL click - For Application projects * for Beans or container.

    Mft file (Manifest file) it is a kind of text file its indicate that the particular class file is the java

    beans / Main File.

    For beans for auto executable

    Notepad A1.mft

    Name: demo/sunw/demo/abc/Bean1.class Main-Class: Login

    Java-Bean: True Java-Bean: True

    to create a user define bean

    1 package always create with demo.sunw.demo.packname;

    eg package demo.sunw.demo.abc;

    2 class always extends with Panel / Canvas / Components. Not

    extends with Frame / Applet / Dialog & Swing classes.

    package demo.sunw.demo.abc;

    public class MyButton extends Button

    {public MyButton()

    {

    super(Click Me); // button create with click Me

    }

    }

    save with MyButton.java

  • 8/3/2019 Java Documentation

    4/4

    3 to create an mft file

    Notepad A1.mft

    Name: demo/sunw/demo/abc/MyButton.class

    Java-Bean: True

    4 to compile a java file

    c:\bdk1.1>javac d . c:\MyButton.java

    5 to create a jar file

    jar file name mft file name class files.

    C:\bdk1.1>jar -cfm jars/My.jar c:\beans\A1.mft demo/sunw/demo/abc/

    c create a new jar file

    f jar file name specify, 1st argument is the jar file name.

    m mft file name specify, 2nd argument is a mft file name.

    6 testing the beans is working or not.

    C:\bdk1.1\beanbox> run