Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6373359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:21:16+00:00 2026-05-25T01:21:16+00:00

Look at the sample codes below @Override protected void onPause() { …some code here…

  • 0

Look at the sample codes below

@Override
protected void onPause() {
    ...some code here...
    super.onPause();
}

and

@Override
protected void onPause() {
    super.onPause();
    ...some code here...
}

When I asked about differences in code, I did not mean about the flow of execution, which is abvious.

So what is the real difference between these codes? When is it advised to use your code before super() call, and when to use your code after super() call? I guess there are situations when this does matter.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:21:16+00:00Added an answer on May 25, 2026 at 1:21 am

    You should not place any of your code before super.onPause(), cause this method lets the system do what it needs to do to properly pause your application. Any code you want to execute in the onPause() callback should be placed after the call to super.onPause(). Hope this helps.

    Quote from Activities:

    Note: Your implementation of these lifecycle methods must always call the superclass implementation before doing any work, as shown in the examples above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created some sample code below, and am trying to use a lambda expression
Sample code is below. If you look at it, you will see gray drop
I have a query on this. Please look at the sample code below: UIButton
I look around and see some great snippets of code for defining rules, validation,
In below sample code, I use lambda function to make 3 threads doing different
All, I am studying some sample code given in my web dev class as
Please look at simple code below public class A{} public class B: A{} public
I need to run the code sample below so that it works on a
My question has to do with facetting. In my example code below, I look
Some things look strange to me: What is the distinction between 0.0.0.0, 127.0.0.1, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.