answersLogoWhite

0

One can get information about how to initialize a byte array in java on the website stackoverflow dot com. That website can learn one a lot about java.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is the purpose of a byte in Java?

Java coding uses byte as one of the programming directives to clarify commands. Byte can also be used in the Java code to save memory space when the need arises.


Which one of the following will declare an array and initialize it with five numbers?

To declare an array and initialize it with five numbers, you can use the following syntax in languages like Java or C++: int[] numbers = {1, 2, 3, 4, 5};. This creates an integer array named numbers and initializes it with the values 1, 2, 3, 4, and 5. In Python, you would simply write numbers = [1, 2, 3, 4, 5].


Summarize the ruls for writing a one dimessional array definetion?

To define a one-dimensional array in programming, you typically specify the type of elements the array will hold, followed by the name of the array, and the size of the array in square brackets. For example, in languages like C or Java, you would write int myArray[10]; to declare an array named myArray that can hold 10 integers. Additionally, it's important to initialize the array if needed, either at the time of declaration or later in the code. Remember that array indexing usually starts at zero.


Why might one need a sting array object in Java?

One might need a sting array object in Java to use protective measures on one's computer to prevent one's program from writing outside the bounds of the array.


What does the Java compiler translate Java source code to?

The Java compiler translates Java source code to Java byte code.


How linker works?

There is no such thing as a Java "linker". There is, however, the concept of a classloader which - given an array of java byte codes from "somewhere" - can create an internal representation of a Class which can then be used with new etc...................


What is the size of byte in java?

The size of a byte primitive is 8-bits.


How arrays are created in java?

Arrays are created just like other variables in Java. Ex: int[] a; // declares an array of integers a = new int[10]; // allocates memory for 10 integers a[0] = 100; // initialize first element a[1] = 200; // initialize second element Arrays are homogenous data types and hence they can contain values of only one type. If you create an integer array it can hold only integer data type values. If you try to assign values to nonexistent locations like a[15] it will throw an index out of bounds exception.


How can you convert byte to string in java?

To convert byte to String in java use the String(bytes, UTF-8); //example for one encoding type. You must know the special encoding that contains a variety of characters.


In Java can Array be extended after it has been initialized?

In Java, arrays have a fixed size once they are initialized and cannot be extended. If you need a resizable array, you can use the ArrayList class from the Java Collections Framework, which allows for dynamic resizing. Alternatively, you can create a new array with a larger size and copy the elements from the original array to the new one if you want to extend an existing array.


Declare and initialize 2D array in java using two statements- one to declare variable the other to initialize elements?

I'm not sure what you're asking. Do you mean when you declare/instantiate an array like this? int[][] arr; arr = {{1, 2, 3},{4, 5, 6}}; I think that's right. *********************************** THIS IS INCORRECT because you can assign constant values to array only at time of initialization. Therefore above code will throw an error. Correct way is: int[][] arr = {{1, 2, 3},{4, 5, 6}}; thanx .. itsabhinav123@gmail.com


Character use only one byte why Java use two byte for character?

The number of bytes used by a character varies from language to language. Java uses a 16-bit (two-byte) character so that it can represent many non-Latin characters in the Unicode character set.