Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Help: Data Structures and Data Types

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help: Data Structures and Data Types

    Hey everyone!

    I've been self-teaching myself Java for a quite a bit now. Though I still consider myself a beginner, I feel as though I've learned a lot. Oftentimes though when I'm learning things by myself I like to make sure no terms are left unambiguous for me. For example, I while learning the language, I made sure to understand the difference between parameters and arguments and things like fields and variables. Right now though I'm trying to grasp what is truly meant when people say "Data Structures" and "Data Types".

    As of right now, after researching a lot, I'm thinking Data Types are simply the different types ranging from the primitive types (integer, boolean) to the man-made classes (maybe a Puppy class for example). Data Structures I'm thinking are ways of organizing these Data Types? Yet this still confuses me as I see Arrays called Data Types but at other times called Data Structures. What category would Enumerations fit in?

    Thanks in advance!


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Help: Data Structures and Data Types

    Treat a data structure as the concept of how the data is organized in storage. Essentially this is the important part because it leads into accessing the stored data.
    The data type is just the type of data in question. Words, numbers, or in the case that leads to most confusion, a data structure itself as a data type. Take the Array for example..

    When people refer to a data structure, they refer to the idea of all elements as a whole unit. So in the case of an array, the array itself is the structure, and a single element in the array is of a data type.
    In the case of an array of arrays, where one array holds several arrays (which each internally have their own elements which can also be arrays or not), the outermost array is the main data structure, and the inner arrays are data types, which just happen to be a type that is also a structure. It is like putting a box inside a box. The inner box can hold an item, and that item can be a box or a shoe or a number.

    When it all boils down, you have to consider the context where it is used to understand the meaning

  3. #3
    Junior Member
    Join Date
    Jul 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Help: Data Structures and Data Types

    Aaah, that was a perfect explanation. Thanks so much! I really appreciate your quick response

Similar Threads

  1. data structures question
    By hwoarang69 in forum Algorithms & Recursion
    Replies: 2
    Last Post: November 4th, 2012, 03:07 PM
  2. Please help about data structures.
    By bruce88 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: September 16th, 2012, 04:11 PM
  3. [SOLVED] O(log n): a simple question for Logarithm in Data structures & Algo
    By chronoz13 in forum Algorithms & Recursion
    Replies: 1
    Last Post: September 7th, 2012, 08:20 AM
  4. [SOLVED] Data Structures: Symbolic Algebra with Trees
    By Staticity in forum What's Wrong With My Code?
    Replies: 2
    Last Post: August 20th, 2012, 01:42 AM
  5. Replies: 0
    Last Post: November 6th, 2011, 03:55 PM