Computer Science, asked by kushankur99, 1 year ago

How to write variable description table for an array variable, please show with an example.​


amannishad0512p5zxh6: mark me brainlest

Answers

Answered by amannishad0512p5zxh6
26

int marks[ ] =new int [ 6];

String names[ ] =new String [ 8];

double fraction[ ] =new double[ 2];

long mobileno[ ] =new long[ 7];

In above all examples, array is declared and initialised by different data types and sizes.

Now, Variable Description Table(V D T)

Data types Purpose

int to store marks

String. to store names

double to store fractional numbers

long to store mobile numbers

Hope it will help

for more java doubts ask me and follow me,

if any problem ask me again and Mark me brainlest if you like.


kushankur99: where are u from?
amannishad0512p5zxh6: From U.P.
amannishad0512p5zxh6: Kanpur
amannishad0512p5zxh6: I wanted to be software engineer
amannishad0512p5zxh6: i love coding most of time
amannishad0512p5zxh6: and interest in technology
amannishad0512p5zxh6: Kanpur u.p
kushankur99: great mate
kushankur99: wish u all the best
amannishad0512p5zxh6: Thanks
Answered by dreamrob
23

Variable Description Table

It is used to give a good idea about the variables that have been used in our program. It includes variable name, data type and description(i.e, for what purpose we are using the variable).

import java.util.*;

class test

{

  public static void main();

  {

     Scanner Sc=new Scanner(System.in);

     int IntegerData[]={23,43,78};

     long LongData[]={9957773828,8283818484,456789234};

     double DoubleData[]={1.2,3.3,8.4};

     char CharacterData[]={'w','s','e'};

     String StringData[]=(''cvfvg'',''cdvg'',''tgfd''};

     for(int i=0;i<3;i++)

     {

     System.out.println(IntegerData[i]+"\t"+LongData[i]+"\t"+DoubleData[]+"\t"+CharacterData[i]+"\t"+StringData[i]);

     }

  }

}

Variable Description Table

Variable Name   Data Type   Description

IntegerData             int             To store integer data

LongData               long           To store long data

DoubleData         double         To store double data

CharacterData       char           To store character data

StringData            String          To store string data

i                                int             To iterate the for-loop for display the data

Similar questions