Added: 2 years ago
From: thenewboston
Views: 30,962
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (49)

Sign In or Sign Up now to post a comment!
  • i get errors if i don't put static as it is!

    static int [] iray = {1,4,5,6}; static char [] hray = {'a','v','c'};

    why is that?

    tanx

    i like your video !!

  • Lol, watched this and then I was like WTF, and then I noticed I was watching the Intermediate tutorial.

  • May I know about it?

    I'm infant with Java programming...I'm curious with these example. Both of example give us same reasult..What is the different?

    String[] thePeople = {"Marc", "Dav", Kevin};

    //and

    String thePeople[] = {"Marc, "Dave", "Kevin"};

    //I demonstrated in that way;

    for(String x:thePeople) System.out.println(x);

  • @bishnuinet I believe u can use the prior i.e String [] a,b,c to declare several arrays of type string as opposed to String[] a,b,c which makes 1 string array(a) and two variables (b & c)

  • @bishnuinet

    its the same but some ppl maybe prefer arrays in C++ style where its

    string array[];

    i dont know at all ;/

  • lol, this is so funny, are you using a book as a guide or something? because my course at school is following EXACT the same steps as you are, so I'm wondering if you both are using a book as guide line, or if they are making there slides based on your videos ;p

  • @immortaljin They are copying bucky :D

  • "...but I'll be telling you that in the next tutorial."

    "Honey time to go sleep!"

    "FFFUUFUUUU- *BEEEEEEEP*"

  • int the app.net add to the right is that a creeper on the rihgt?

  • GENERIC METHODS

  • I'm understanding this less and less, this sucks, maybe i need a break, but idk

  • Sweet!!!

  • Does anyone know how multi-dimensional arrays work in this case?

  • bucy ftw

  • I dont think many people understood the last tutorial; he's lost about 130,000 viewers!

  • Is this like type conversions in c++?

  • did you put this on your site?

    I didn't see it..

  • Hey, why does he use Character[] cray and Integer[] iray instead of char[] cray and int[] iray?

  • @360boxes Because you can't use primitive types like int and char in generic parameters.

  • @360boxes Every primitive type has a corresponding "wrapper" class... for int, it's wrapper class is Integer. For char, it's Character. Same shit really...

  • @360boxes

    He prob should of used int, and char to create those arrays but his syntax is completely acceptible b/c arrays are objects and 'Integer' and 'Character' represent objects.

  • @360boxes because generics only work with objects and not primitive types

  • @360boxes

    Because char and int are primitives and they don't work with ArrayList

  • @360boxes

    generic method only process object and never primitive types, that's why the array are created in the correspondant type wrappers

  • @360boxes

    Collections/Generic methods have to take objects not primitive data... the int's get autoboxed to Integers when they are added

  • Comment removed

  • @360boxes is the same thing for example int a[] is the same as int[] a it doesn't affect the code it's just another way of writing it.

  • @360boxes because char and int are just shorthand ways of calling the classes Character and Integer

  • @360boxes I believe they're the reference data types. I haven't a clue on the purpose though :P

  • @360boxes He needs it to be an array of objects, not primitives.

  • @360boxes He is using the full version of the data type to avoid confusion instead of the truncated int and char.

  • @360boxes Read up on Generics and their associated wrapper classes that will clear up your question

  • @360boxes here. I am a little late.... but here... lol. I'm not even sure if you remember posting this xD but here is why you say Integer and not int

    /watch?v=GG7AjNXS0OA

  • @360boxes

    Int, Char are basic types but Integer and Character are classes that represent Int or Char, they have some more methods

  • @360boxes It's both possible, Character[] is the super class. I'd use char[] aswell, but apparently it doesn't matter.

  • Comment removed

  • Comment removed

  • Thanks Man.

  • Thank you, this is helping me a lot

  • what java are you using? drJava or what?

  • do you mean IDE, cuz he's using eclipse, watch his second or third java programing video

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more