Tuesday, 27 October 2015

Multiplication java programming

Multiplication java programming


  • Open netbeans and open new frame.
  • Put the components from pallet to jFrame as given below

    • Open source code window by double clicking on button.
    • Write the code as given below

    • Handling with numbers we us either short as short or long as long or integer as it.
    • We have use int.
    • Integer.parseInt is a code us for coding a number.
    • a and b at variables use to type number while c is used to store the the value of a and b and also to show result.
    • * sign is use between a and b for the multiplication.
    • After completing it ,run the program and see what happens.

    Subtraction java programming

    Subtraction java programming


  • Open netbeans and open new frame.
  • Put the components from pallet to jFrame as given below

    • Open source code window by double clicking on button.
    • Write the code as given below
    • Handling with numbers we us either short as short or long as long or integer as it.
    • We have use int.
    • Integer.parseInt is a code us for coding a number.
    • a and b at variables use to type number while c is used to store the the value of a and b and also to show result.
    • - sign is use between a and b for the subtraction.
    • After completing it ,run the program and see what happens.

    Monday, 26 October 2015

    Addition java programming

    Addition java programming


  • Open netbeans and open new frame.
  • Put the components from pallet to jFrame as given           below


    • Open source code window by double clicking on button.
    • Write the code as given below


    • Handling with numbers we us either short as short or long as long or integer as it.
    • We have use int.
    • Integer.parseInt is a code us for coding a number.
    • a and b at variables use to type number while c is used to store the the value of a and b and also to show result.
    • + sign is use between a and b for the addition.
    • After completing it ,run the program and see what happens.

    Sunday, 25 October 2015

    String type java programming

    String type java programing
    • Open netbeans and make new application with new name.
    • Right click on new application and select new frame.
    • Drop four jLabel,jTextField and jButton from pallet on frame.
    • Name these component as your wish.
    • Double click on jButton.
    • Source code editor will turn up.
    • Type the cooding given in the picture below.


    • Declear the variables.
    • Get text means to take text.
    • Set text means to provide text.
    Completing it right click on the window and click run file.


    • Type only on that text field which is related with get text.
    • Click on button and see what happens.

    Monday, 12 October 2015

    Run a line in java

    RUN A LINE IN JAVA
    • Open net-beans.
    • Right click on project to open java class.
    • Code editor window will open.
    • Public class should be untouched.
    • Red line shows error.
    SOURCE CODE



    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */

    /**
     *
     * @author sarita
     */
    public class NewClass {
        public static void main(String args[]){
            System.out.println("java");
        }

    }
    CODE TO BE WRITTEN



    public static void main(String args[]){
    System.out.println("java");












    Sunday, 11 October 2015

    Opening java project

    Opening java project

    • To open java project following steps have to be follow;-
    • Open net-beans program which an be downloaded on the given link
    HTTP;//java.sun.com/javase/downloads/netbeans.html
    • After opening net-beans click on file button.
    • Then click on new project.
    • Then click on java application and click next button.
    • Give any name to the program and then click on finish button.
    • It will open code editor window.
    Video is given below