Linking openNewDialog() to activity
<p>Hi i was creating my own application and i was wondering how i can link each difficulty to a new page such as Easy.java, Medium.java etc so i can work on eacg page indivisually. when the user clicks new game the openNewDialog would display then each difficulty that would be linked to an activity using intents</p>

<pre><code>package org.brain.b;

public class Brain extends Activity implements OnClickListener{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Set up click listeners for all the buttons
View continueButton = findViewById(R.id.continue_button);
continueButton.setOnClickListener(this);
View newButton = findViewById(R.id.new_button);
newButton.setOnClickListener(this);
View aboutButton = findViewById(R.id.about_button);
aboutButton.setOnClickListener(this);
View exitButton = findViewById(R.id.exit_button);
exitButton.setOnClickListener(this);
}


public void onClick(View v) {
    switch (v.getId()) {
    case R.id.about_button:
    Intent i = new Intent(this, About.class);
    startActivity(i);
    break;

    case R.id.new_button:
        openNewGameDialog();
        break;

    case R.id.exit_button:
        finish();
        break;
    // More buttons go here (if any) ...

    }
    }

private static final String TAG = "Sudoku" ;
private void openNewGameDialog() {
new AlertDialog.Builder(this)
.setTitle(R.string.new_game_title)
.setItems(R.array.difficulty,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialoginterface,
int i) {
startGame(i);
}
})
.show();
}
private void startGame(int i) {
    Log.d(TAG, "clicked on " + i);
    Intent intent;
    switch(i) {
       case DIFFICULTY_EASY: intent = new Intent(Brain.this, Easy.class); break;

    }
    startActivity(intent);
}




}
</code></pre>

<p>is their a way to link this intent to a new page thank you.
im a begginer. It shows an error where Case EASY_DIFFUCULTY is </p>
