Maruthi Krishna has Published 951 Articles

Can we store objects in an array in Java?

Maruthi Krishna

Maruthi Krishna

Updated on 02-Jul-2020 12:45:01

10K+ Views

Array is a container which can hold a fix number of items and these items should be of the same type. Most of the data structures make use of arrays to implement their algorithms. Following are the important terms to understand the concept of Array.Element: Each item stored in an ... Read More

Can you change size of Array in Java once created?

Maruthi Krishna

Maruthi Krishna

Updated on 02-Jul-2020 12:43:37

7K+ Views

An array is a data structure/container/object that stores a fixed-size sequential collection of elements of the same type. The size/length of the array is determined at the time of creation.The position of the elements in the array is called as index or subscript. The first element of the array is ... Read More

What is an anonymous array and explain with an example in Java?

Maruthi Krishna

Maruthi Krishna

Updated on 02-Jul-2020 12:35:23

2K+ Views

An array is a data structure/container/objectthat stores a fixed-size sequential collection of elements of the same type. The size/length of the array is determined at the time of creation.The position of the elements in the array is called as index or subscript. The first element of the array is stored ... Read More

How to convert integer set to int array using Java?

Maruthi Krishna

Maruthi Krishna

Updated on 02-Jul-2020 12:34:00

9K+ Views

A collection object in Java is the one which stores references of other objects in it. The java.util package provides the classes and interfaces for collections. There are four main collection interfaces namely Set Lists, Queues, Maps.Set − The set object is a collection which stores group of elements, it grows ... Read More

Are the constructors in an object invoked when de-serialized in Java?

Maruthi Krishna

Maruthi Krishna

Updated on 02-Jul-2020 12:31:58

835 Views

In Java, serialization is a concept using which we can write the state of an object into a byte stream so that we can transfer it over the network (using technologies like JPA and RMI).To serialize an object −Make sure the class implements the Serializable interface.Create a FileOutputStream object representing ... Read More

Different ways to traverse an Array in Java?

Maruthi Krishna

Maruthi Krishna

Updated on 02-Jul-2020 12:28:53

12K+ Views

In general, arrays are the containers that store multiple variables of the same datatype. These are of fixed size and the size is determined at the time of creation. Each element in an array is positioned by a number starting from 0.You can access the elements of an array using ... Read More

What are the different ways of copying an array into another array in Java?

Maruthi Krishna

Maruthi Krishna

Updated on 02-Jul-2020 12:26:07

655 Views

In general, arrays are the containers that store multiple variables of the same datatype. These are of fixed size and the size is determined at the time of creation. Each element in an array is positioned by a number starting from 0. You can access the elements of an array ... Read More

What are the different ways to iterate over an array in Java?

Maruthi Krishna

Maruthi Krishna

Updated on 02-Jul-2020 12:21:33

17K+ Views

In general, arrays are the containers that store multiple variables of the same datatype. These are of fixed size and the size is determined at the time of creation. Each element in an array is positioned by a number starting from 0.You can access the elements of an array using ... Read More

What happens if try to access an element with an index greater than the size of the array in Java?

Maruthi Krishna

Maruthi Krishna

Updated on 02-Jul-2020 12:20:04

3K+ Views

An array is a data structure/container/object that stores a fixed-size sequential collection of elements of the same type. The size/length of the array is determined at the time of creation.The position of the elements in the array is called as index or subscript. The first element of the array is stored ... Read More

Can you pass the negative number as an Array size in Java?

Maruthi Krishna

Maruthi Krishna

Updated on 02-Jul-2020 12:18:45

2K+ Views

In general, arrays are the containers that store multiple variables of the same datatype. These are of fixed size and the size is determined at the time of creation. Each element in an array is positioned by a number starting from 0.You can access the elements of an array using ... Read More

Advertisements