Results 1 to 5 of 5
  1. #1
    Gsangha is offline Member
    Join Date
    Dec 2011
    Posts
    8
    Rep Power
    0

    Default A lot of conceptual questions that need clearing up.

    Hi,

    I've been searching for solid answers to these questions but can't find any complete answers. Hopefully someone hear can help me out.


    As far as I know Byte can hold 8bits and values between -128 to 127

    int can hold 32 bits and values between -2,147,483,648 and 2,147,483,647

    A long data contains 64 bits and holds values between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807

    1) is BigInteger used when mathematical computations must be used that hold values above long, without having constraints? and is this done because the number is converted to a string?

    2) Also, when using small numbers (such as -128 to 127) isn't it better/more efficient to use byte? The only reason I ask is because I see a lot of programs that use int instead of byte when concerning small numbers.

    3) Are Queue and Hashtag strictly used when using Linked Lists? Or can they also be applied to ArrayLists

    4) Is the function of a hashtag strictly to remove duplicate variables and disorganize the array? Or does it have other functions I am not aware of.

    5) As far as I know Queue gives priorities to things. Can anyone give me an example of how a queue can be useful? (I tried practicing using it but its hard to practice when I don't know how or where to apply it)

    6) As far as I know threads control when a particular code will activate using .start and .sleep. Can anyone give me an example of how threads can be useful? Again I tried practicing using threads but its hard when you don't know when to use them effectively.

    7) Anyone know a website or a book that has examples of code using various methods? (Something that may contain Queue and Threads)


    Thats all for now!

  2. #2
    clydedoris is offline Member
    Join Date
    Feb 2010
    Posts
    80
    Rep Power
    0

    Default Re: A lot of conceptual questions that need clearing up.

    5) As far as I know Queue gives priorities to things. Can anyone give me an example of how a queue can be useful? (I tried practicing using it but its hard to practice when I don't know how or where to apply it)
    - what kind of problems are you trying to solve on your practice? real world scenarios would be much useful and exciting. From the viewpoint of an application programmer, try to think of concurrent applications/ data processing applications such as servers. Some of these applications might need to process some user requests first before others using the login credentials of the requester. For a system programmer, the list is endless (CPU priority queues, I/O, threading, proxies, etc.)
    [why are you annoyed with my sig?]

  3. #3
    clydedoris is offline Member
    Join Date
    Feb 2010
    Posts
    80
    Rep Power
    0

    Default Re: A lot of conceptual questions that need clearing up.

    2) Also, when using small numbers (such as -128 to 127) isn't it better/more efficient to use byte? The only reason I ask is because I see a lot of programs that use int instead of byte when concerning small numbers.

    -IMO, using bytes is not that much of a concern as it was years back when memory and disk space is limited. also, a major advantage of using a much bigger data type such as an int than byte is that it could be used for another function later on, with respect to how the program works. in other words, i might use it for a bigger value later.
    [why are you annoyed with my sig?]

  4. #4
    clydedoris is offline Member
    Join Date
    Feb 2010
    Posts
    80
    Rep Power
    0

    Default Re: A lot of conceptual questions that need clearing up.

    7) Anyone know a website or a book that has examples of code using various methods? (Something that may contain Queue and Threads)

    - I am not sure if this would help you, but try to use these pages from my site. i personally haven't done the problems yet, so good luck :)
    [why are you annoyed with my sig?]

  5. #5
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    6

    Default Re: A lot of conceptual questions that need clearing up.

    Don't forget the official java tutorials. They have examples of threading and all kinds of nifty stuff!

    The Java™ Tutorials

Similar Threads

  1. screen not clearing during resize
    By cl2606 in forum Java Applets
    Replies: 5
    Last Post: 11-23-2011, 11:55 AM
  2. Conceptual Issue? Please Help, should be simple.
    By justinm231 in forum New To Java
    Replies: 1
    Last Post: 11-18-2011, 10:03 PM
  3. Replies: 3
    Last Post: 08-25-2011, 04:46 PM
  4. emptying/clearing an array
    By i8java in forum New To Java
    Replies: 2
    Last Post: 08-09-2010, 01:39 PM
  5. Help Clearing BufferedImage
    By ketann in forum Java 2D
    Replies: 19
    Last Post: 03-29-2010, 07:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •