Getting error while writting code for onClickListener() in android
<p>Ma COde:-</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    b1=(Button)findViewById(R.id.button2);
    b1.setOnClickListener(new onClickListener()// error Line
    {
        public void onClick(View arg0)
        {
        startActivity(new Intent("com.example.crazy.HistoryActivity"));
        }});
}
</code></pre>

<p>Error Getting:-
Multiple markers at this line
    - onClickListener cannot be resolved to a type
    - The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the arguments (new 
     onClickListener(){})</p>
