package com.example.myapplication;

import android.os.Build;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {
   parcleObject sample;

    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.parcleObject).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
               sample=new parcleObject("sairamkrishna Mammahe");
                Toast.makeText(MainActivity.this,sample.getName(),Toast.LENGTH_LONG).show();

            }
        });
    }


}


