Html Design

Design By Masudul

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Monday, March 26, 2018

Precedence of Java code

/* Example of Precedence */
package Precedence;
public class Precedence
{
    public static void main(String[] args)
    {
        int a = 5, b = 10, c = 15, d = 20;
        int x, y, z;
        x = a * b - c;
        y = a - d / b + c;
        prln("a = " +a+ "\tb = "+b);    // Implies(5 * 10) - 15, Not 5 * (10 - 15)
        prln("c = " +c+ "\td = "+d);    // Implies 5 - (20 / 10) + 15
        prln("a * b - c = "+x);
        prln("a - d / b + c = "+y);
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}









Share:

About array in Java programme


Array:

Under the name of a common variable, the data stored in memory of the same type stored in memory is called array. The array is the number of variables set in the same type. Array variables can save multiple data in the same name, same type. Array is a derived data type. Before using the variable declaration, it is necessary to declare array variables with data types. The array declaration format is in Java:-


DataType ArrayName[];

ArrayName = new DataType[ ArraySize ];


The above two statements are also written together in this way:-



DataType ArrayName[] = new DataType[ ArraySize ];

Here, DataType is any build-in or custom data type, ArrayName is give programmer any accept name and ArraySize is published of integer any constant name. The name of the variable is an identifier. So valid names of variables can be given. Array size is defined in the third bracket [] of adjacent arrays. Which indicates the number of data in the array variable. This number is called array index and each distinct array of arrays is called an array element separately.

Example :-


char name[] = new char[20];

int roll[] = new int[10];

float mark[] = new float[5];
Share:

Sunday, March 25, 2018

Ternary Operator of Java Programme

/* Example of  Ternary Operator */
package Conditional;
public class Conditional
{
    public static void main(String[] args)
    {
        int a = 10, b = 15;
        int result;
        result = (a > b) ? a : b;
        prln("Maximum of "+a+ " and "+b+ " is: \t"+result);
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}












Share:

Various data type of Java Programme

/* Various data type of Java language */



Share:

Assignment Operator of Java Programme

/* Example of Assignment Operator */
package webpractrice;
public class WebPractrice
{
    public static void main(String[] args)
    {
        int a = 10, b = 20;
        prln("a = "+ a + "\t\tb = "+b);
        a += 5;
        b *= 5;
        prln("(a+=5) = "+a+ "\t(b*=5) = " +b);
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}









Share:

Bitwise Operator of Java Programming

/* Example of Bitwise Operator */
package Bitwise;
public class Bitwise
{
    public static void main(String[] args)
    {
        int Op1 = 5, Op2 = 10;
        int BitwiseOR, BitwiseAND;
        int LSvalue, RSvalue, RSzerofill;
        BitwiseOR = Op1 | Op2;
        BitwiseAND = Op1 & Op2;
        prln("Bitwise OR of " + Op1 + " and " + Op2 + " is: " +BitwiseOR);
        prln("Bitwise AND of " + Op1 + " and " + Op2 + " is: " +BitwiseAND);
        LSvalue = Op2<<2;
        prln("2 times left shift of " +Op2+ " is: " +LSvalue);
        RSvalue = Op2>>2;
        prln("2 times right shift of " +Op2+ " is: " +RSvalue);
        RSzerofill = Op2>>>2;
        prln("2 times right shift with zero fill of " +Op2+ " is: " +RSzerofill);
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}












Share:

Logical operator of Java Programme

/* Example of Logical Operator */
package Logical;
public class Logical
{
    public static void main(String[] args)
    {
        boolean a = true, b = true , c = false, result;
        prln("a = "+a+"\t b = "+b+ "\t c = "+c);
        result = a && b || c;
        prln("a && b || c = "+result);
        result = a || b && c;
        prln("a || b && c = "+result);
        result = a && !a;
        prln("a && !a = "+result);
        result = a || !a;
        prln("a || !a = "+result);
        result = c && !c;
        prln("c && !c = "+result);
        result = c || !c;
        prln("c || !c = "+result);
     
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
 
}












Share:

Arithmetic operator of Java Programme

/* Example of Arithmetic Operator */
package Arithmetic;
public class Arithmetic
{
    public static void main(String[] args)
    {
        int a = 10, b =15, c = 20;
        float d;
        int result;
        d = (float)b/(float)a;
        prln("a = "+a);
        prln("b = "+b);
        prln("c = "+c);
        prln("Division : b/a = "+d);
        result = b % a;
        prln("\n Modulo: b%a = "+result);
        result = a * b + c;
        prln("\n Exprission : a*b+c = "+result);
        result = a + b * c;
        prln("\n Expression : a + b * c = "+result);
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}












Share:

Saturday, March 24, 2018

Decremental of Java Programming

/* Example of Post-Decrement & Pre-Decrement */
package Decremental;
public class Decremental
{
    public static void main(String[] args)
    {
        int counter = 1;
        prln("Counter is : " +counter);
        prln("\n--Counter is : "+ --counter);
        prln("\nCounter is : "+counter);
        counter = 1;
        prln("\nCounter is : "+counter);
        prln("\nCounter++ is : "+counter--);
        prln("\nCounter is : "+counter);
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}






Share:

Post-Increment & Pre-Increment using in Java

/* Example of Post-Increment& Pre-Increment */
package Incremental;
public class Incremental
{
    public static void main(String[] args)
    {
        int counter = 0;
        prln("Counter is : " +counter);
        prln("\n++Counter is : "+ ++counter);
        prln("\nCounter is : "+counter);
        counter = 0;
        prln("\nCounter is : "+counter);
        prln("\nCounter++ is : "+counter++);
        prln("\nCounter is : "+counter);
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}












Share:

CharInput of Java Programme

/* Reading a character from Keyboard */
package CharInput;
import java.io.DataInputStream;

public class CharInput
{
    public static void main(String[] args)
    {
     DataInputStream in = new DataInputStream(System.in);
     char ch;
     try
     {
         pr("Enter a Character : ");
         ch = (char)System.in.read();
         prln("You have enterred : "+ch);
     }
     catch(Exception e){
       
     }
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}








Share:

Cast Operator of Java Programme

/* Example of Cast Operator */
package CastOperator;
public class CastOperator
{
   
    static public void main(String[] args)
    {
        int x = 11, y = 5;
        prln("x = "+x);
        prln("y = "+y);
        prln("Without Casting x/y = " +x/y);
        prln("After Casting x/(float)y = " +x/(float)y);
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}




Share:

Monday, March 19, 2018

DataTypes using in Java

/* Various type Primitive data type using */
package DataTypes;
public class DataTypes
{
    static boolean b = true;
    static char c = 'A';
    static byte x = 100;
    static short s = 5000;
    static int i = 3200000;
    static long l = 343489089;
    static float f = 45.90f;
    static double d = 32987.21;
   
    static public void main(String[] args)
    {
        prln(b);
        prln(c);
        prln(x);
        prln(s);
        prln(i);
        prln(l);
        prln(f);
        prln(d);
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}





Share:

Sunday, March 18, 2018

String Operation of Java Programme

/* Example of String Operation */
package StringOperation;
public class StringOperation
{
    static public void main(String[] args)
    {
        String S1 , S2;
        S1 = new String("I Love ");
        S2 = new String("Java Programming");
        pr(S1);
        prln(S2);
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}



Share:

Character dispaly of Java Programme

/* Assigning Value to Character variables */
package charDispaly;
public class charDispaly
{
    static public void main(String[] args)
    {
        char ch1 = 65;
        char ch2 = 'A';
        prln("Ch1: "+ch1);
        prln("Ch2: "+ch2);
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
 
}


Share:

Saturday, March 17, 2018

Boolean Test of Java Programming

/* Working with boolean type Variable */
package BoolenTest;
public class BoolenTest
{
    static public void main(String[] args)
    {
        int x , y;
        boolean z;
        x = 15;
        y = 10;
        prln("x > Y is "+(x > y));
        z = y > x;
       
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}


Share:

Classification of Java


Share:

Blogger templates