1. abhilashts's Avatar
    i am a complete beginner
    here is the code

    //get a reference to textview
    TextView brands=(TextView) findViewbyid(R.id.brands);

    //get a reference to spinner
    Spinner brands=(Spinner) findViewbyid(R.id.brands);

    what is happening in the above code

    thank you
    01-03-2016 12:30 PM
  2. ManiacJoe's Avatar
    A variable is a named "box" that you put data into.
    integer x = 7;
    integer y = 4;
    x = y; // x got a copy of the data in y

    A pointer is a variable that contains the memory address of a variable. This is used to "point at" other variables and change their data.
    integer x = 7;
    integer & p = null; // points to "nothing"
    p = &x // p now points to x
    *p = 12; // the contents of what p points to (x) now is 12

    A reference is a pointer that cannot point to "nothing". Using a pointer that points to "nothing" will crash the app.
    01-03-2016 03:55 PM

Similar Threads

  1. New Tab S 10.5 in the future?
    By Jims S5 in forum Samsung Galaxy Tab S 10.5
    Replies: 8
    Last Post: 03-29-2016, 08:35 AM
  2. Does knox Warranty void: 0x0 mean I voided my warranty?
    By AC Question in forum Samsung SAFE and KNOX
    Replies: 2
    Last Post: 01-03-2016, 11:40 AM
  3. My. LG 4G LTE VS950 is stuck in a bootloop please help
    By Naturalgal 99 in forum Ask a Question
    Replies: 1
    Last Post: 01-03-2016, 11:16 AM
  4. Is this normal when I look at my storage capacity in my Note 4?
    By Cassie_RVT in forum Samsung Galaxy Note 4
    Replies: 0
    Last Post: 01-03-2016, 11:01 AM
  5. Replies: 0
    Last Post: 01-03-2016, 10:49 AM