hi all
iam new to Java and i found how to write spinner code Spinner | Android Developers
since i dont have Java knowledge i have tow questions :

first question :

how do i change the code in spinner that when i choose lets say "Venus" it will show me the number 555
i have changed the code like that but it dose not work :

Java Code:
public class MyOnItemSelectedListener implements OnItemSelectedListener {

    public void onItemSelected(AdapterView<?> parent,
        View view, int pos, long id){
    if (parent.getItemAtPosition(pos).toString().equals("Venus"))
    {
    	 Toast.makeText(MyOnItemSelectedListener.this, "555", Toast.LENGTH_LONG).show();
    }
    public void onNothingSelected(AdapterView parent) {
      // Do nothing.
    }
}

second question :

can u give me a link for learning writing Java code for android



thanks for the helpers :)