Use whichever one you like. System.exit(0)
probably is the most efficient, being a system method that directly exits the JVM running your app.
More Related Contents:
- Extracting only digits from a String [closed]
- Unfortunately MyApp has stopped. How can I solve this?
- Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio
- How to get URL from Firebase Storage getDownloadURL
- Unable to execute dex: Multiple dex files define
- Error:(23, 17) Failed to resolve: junit:junit:4.12
- Change the System Brightness Programmatically
- String comparison – Android [duplicate]
- Change background color of single specific menu items of navigationView
- Create a new TextView programmatically then display it below another TextView
- I would like to set my variables at the top of my class instead of in the method
- What exactly does URLConnection.setDoOutput() affect?
- Unable to execute dex: GC overhead limit exceeded in Eclipse
- URLConnection getContentLength() is returning a negative value
- RecyclerView not calling onCreateViewHolder or onBindView
- How does BreakIterator work in Android?
- What is the correct way to do inserts/updates/deletes in Android SQLiteDatabase using a query string?
- Is it possible to use VectorDrawable in Buttons and TextViews using android:DrawableRight?
- Android Days between two dates
- java.lang.RuntimeException: takePicture failed
- Firebase Database points to wrong database URL
- Google Maps API and custom polyline route between Markers
- Cant start service? (Speech recog)
- Android LocationServices.FusedLocationApi deprecated
- android studio with Java compiler error: string too large to encode using UTF-8 written instead as ‘STRING_TOO_LARGE’
- Problems with Firestore connections executing threads
- How to speed up unzipping time in Java / Android?
- How can i replace type_orientation (is deprecated) for android 4.0.3?
- calculate number of weeks in a given year
- IllegalArgumentException: Unknown URL content:// CONTENT