Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid development eclipse (list activity)
    primarykey
    data
    text
    <p>It has the 'class' underlined in yellow and says its a warning saying that 'Class is a raw type. References to generic type Class should be parameterized'</p> <pre><code>Class ourClass = Class.forName("com.thenewboston.jack." + cheese); </code></pre> <p>I have tried all the quick fixes and every thing. I don't know what to do. Could any one help and tell me what to do?</p> <hr> <p>Here is the rest of the code and where the code is placed:</p> <pre><code>package com.thenewboston.jack; import android.app.ListActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; import android.widget.ListView; public class Menu extends ListActivity{ String classes[] = {"Startingpoint", "Example1", "Example2", "Example3" , "Example4", "Example5", "Example6", "Example7", "Example7", "Example7"}; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setListAdapter(new ArrayAdapter&lt;String&gt;(Menu.this, android.R.layout.simple_expandable_list_item_1, classes)); } @Override protected void onListItemClick(ListView l, View v, int position, long id) { // TODO Auto-generated method stub super.onListItemClick(l, v, position, id); String cheese = classes[position]; try{ Class ourClass = Class.forName("com.thenewboston.jack." + cheese); Intent ourIntent = new Intent(Menu.this, ourClass); startActivity(ourIntent); }catch(ClassNotFoundException e){ e.printStackTrace(); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload