android -writing to file

0
void savefile (Context context)
{
try
            {
                FileOutputStream fOut = new context.openFileOutput(file,context.MODE_PRIVATE);
                OutputStreamWriter osw = new OutputStreamWriter(fOut);
            }
            catch(Exception e){System.out.println(e.toString());}
}

ten kod daje error: package context does not exist

0

Zamień new context na context.

1 użytkowników online, w tym zalogowanych: 0, gości: 1