Solved

return in catch statement

Posted on 2016-09-17
1
52 Views
Last Modified: 2016-09-18
Hi,

When we use return in catch statement. I never used return in catch statement myself but saw a code like that. Wondering why we use return in catch block after some system out statement giving user instructing t enter proper values? please advise
0
Comment
Question by:gudii9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 14

Accepted Solution

by:
CPColin earned 500 total points
ID: 41803502
You've asked a very similar question to this one before. You would use a return statement in a catch block if you want to return from your method at that point in your code, same as using a return statement in any other block. There's really not much more to it than that.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
login jsp example 24 101
ejb stateless example 2 62
How do I remove an object from a 3 59
pagenation logic how it is working in my code 1 80
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question