✏️ Explanatory Question
int[] intArray = new int[10]; // Array of 10 integers
String[] strArray = {"Java", "Python", "C++"}; // Array of 3 strings
double[] dblArray = new double[4]; // Array of 4 double elements
float[] floatArray = new float[5]; // Array of 5 float elements
char[] charArray = {'A', 'B', 'C', 'D'}; // Array of characters
boolean[] boolArray = {true, false, true}; // Array of boolean values
long[] longArray = new long[6]; // Array of 6 long elements
byte[] byteArray = new byte[4]; // Array of 4 byte elements
short[] shortArray = new short[3]; // Array of 3 short elements
int: Stores integers (whole numbers), e.g., int[] intArray = new int[10];String: Stores sequences of characters, e.g., String[] strArray = {"Java", "Python", "C++"};double: Stores double-precision floating-point numbers, e.g., double[] dblArray = new double[4];float: Stores single-precision floating-point numbers, e.g., float[] floatArray = new float[5];char: Stores a single character, e.g., char[] charArray = {'A', 'B', 'C', 'D'};boolean: Stores true/false values, e.g., boolean[] boolArray = {true, false, true};long: Stores long integers, e.g., long[] longArray = new long[6];byte: Stores byte-sized integers, e.g., byte[] byteArray = new byte[4];short: Stores small integers, e.g., short[] shortArray = new short[3];This covers the fundamental data types in Java along with array declarations for each one.