Please answer all of the questions the questions are asking about java programs
ID: 3696268 • Letter: P
Question
Please answer all of the questions the questions are asking about java programs in this instance.
1. An array is a group of variables, and it can only take the same type values (True/False).
2.The elements of an array can be primitive types, but not reference types(True/False).
3. An index of an array must be int value or a byte, short, or char type value(True/False).
4.
Question: what’s the difference between
int[ ] a, b, c; and int a[ ], b, c; ?
5. What’s the difference between byte-based streams and character-based streams (binary
file and text file)?
6. Two ways to pass arguments in method calls in many programming languages are call-by-value and call-by-reference.When a method modifies a primitive-type parameter, changes to the parameter have no effect on the original argument value in the calling method. (True/False)
7.When a method modifies a reference-type parameter, changes to the parameter will also change the original argument value in the calling method. (True/False)
Explanation / Answer
1. True
Because array is a collection of same type of data types
2.False
An element of an array can be either primitive or refernce
3. True
Arrays must be indexed by int values ,short ,byte ,char values may also be used as index
4. There is no differnce. In both the cases a is an array and b,c are integer variables.
An array can be declared as data type arr[] or datatype [] arr
5.Streams that input and output bytes to files are known as Byte base streams.
Streams that input and output characters to files are known as Character based streams
6.True
Because When a method modifies a primitive type parameter changes to the parameter have no effect on original argument
7.True
Because when a method modifies refernce type parameter changes to the parameter will change the original argument
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.