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.

Friday, April 6, 2018

Array Input Output of Java

/* Assigning value to array elements through keyboard */
package webpractrice;

import java.io.*;
public class WebPractrice

    public static void main(String[] args) throws IOException
    {
        int Roll[] = new int [5];
        String S[] = new String[5];
        for (int i = 0; i < 5; i++)
        {
            System.out.print("\nEnter Your ID [" +i +"] : ");
            BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
            S[i] = BR.readLine();
            Roll[i] = Integer.parseInt(S[i]);
        }
        for(int i = 0; i < 5; i++)
        {
            System.out.println("\nID[" +i+ "] = "+Roll[i]);
        }
    }
   
}









Share:

Thursday, April 5, 2018

Explain of Array types


Dimension Explain of Array :-


Array can be divided into the following categories based on the dimension.
1.     One dimensional array.
2.     Two dimensional array.
3.     Multi-dimensional array.
One Dimensional Array :
  Array is a dimensional array balloon made with a single user.

Its structure :
data_type array_name[ size ];
Example :
int i[ 10 ];
float a[ 10 ];
char ch[ 20 ];
double b[ 5 ];

Two Dimensional Array :

  Array is a dimensional array balloon made with a two user.
          Its structure :
                    data_type array_name[ row_size ][ col_size ];
          Example :
                    int student[ 3 ][ 4 ]; 
60
[ 0 ][ 0 ]
80
[ 0 ][ 1 ]
75
[ 0 ][ 2 ]
62
[ 0 ][ 3 ]

40
[ 1 ][ 0 ]
90
[ 1 ][ 1 ]
82
[ 1 ][ 2 ]
34
[ 1 ][ 3 ]





25
[ 2 ][ 0 ]
10
[ 2 ][ 1 ]
35
[ 2 ][ 2 ]
42
[ 2 ][ 3 ]





Multi-dimensional Array :

  Array is a dimensional array balloon made with a three or more than user.
          Its structure :
                    Data_type array_name[ s1 ][ s2 ]….[ sn ];
          Example :
                    int s[ 2 ][ 3 ][ 4 ];
                    float table[ 5 ][ 6 ][ 4 ][ 5 ];


Initialization :


One Dimensional Array :
Static data_type array_name[ size ] = { list of values };
Example : static int number[ 3 ] = { 5, 0, 7 };

Two Dimensional Array :


There are same type of one dimensional array;
Example : static int table[ 2 ][ 3 ] = { 1, 2, 3, 4, 5, 6 };
Example of Matrix: static int table[ 2 ][ 3 ] = {{ 1, 2, 3}, {4, 5, 6} };


Share:

Array output in Java code

/* Example of Array Output */
package ArrayOutput;
public class ArrayOutput
{
    public static void main(String[] args)
    {
        int marks[] = {23, 54, 34, 10, 15, 30, 25};
        for(int i = 0; i <= 6; i++)
        {
            prln("Mark["+i+"] = "+marks[i]);
        }
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}















Share:

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:

Blogger templates