The Artima Developer Community
Sponsored Link

Java Buzz Forum
10 points about Array in Java

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Javin Paul

Posts: 1090
Nickname: javinpaul
Registered: Jan, 2012

Javin Paul is Java Programmer working on Finance domain.
10 points about Array in Java Posted: Aug 3, 2014 2:09 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Javin Paul.
Original Post: 10 points about Array in Java
Feed Title: Java67
Feed URL: http://www.java67.com/feeds/posts/default?alt=rss
Feed Description: Java and technology tutorials, tips, questions for all programmers.
Latest Java Buzz Posts
Latest Java Buzz Posts by Javin Paul
Latest Posts From Java67

Advertisement
Without any doubt, array is one of the most used data structure in all programming language, including Java. Pick up any programming language be it functional, object oriented, imperative or even scripting language like Python, Bash and Perl, you will always find array. That's why it's important for any programmer to have good understanding of  arry data structure. Array is used to store elements in contiguous memory location and many C, C++ programmer can take advantage of pointer to work with array. In Java, there is no pointers and arrays are also little bit different. They are object, they have length field which denotes how many elements array can store. Arrays are created in special memory area called heap memory in JVM, which is also created when you start the JVM. What remains same is that you can access the array element in constant time using their index, this works almost similarly in both C, C++ and Java, they start with 0 and ends at length -1, but Java array has an extra caveat that array index access are subject to bound check in Java. In C, it's possible for a program to access an invalid index, mostly index higher than size of array. In Java such attempts will result in ArrayIndexOutOfBoundsException, this is done to protect  external memory  access from JVM due to malicious programs.
Read more »

Read: 10 points about Array in Java

Topic: JDBC Batch Processing - Introduction Previous Topic   Next Topic Topic: Logback Configuration Example

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use