Solved

checked and unchecked exception

Posted on 2014-02-04
6
280 Views
Last Modified: 2014-02-18
Hi,

I am working on below example

http://www.avajava.com/tutorials/lessons/whats-the-difference-between-a-checked-and-an-unchecked-exception.html?page=1


When i try to run this example I am getting compilation error at the CheckeException and UnCheckedException.

How to fix these errors.

Also as given in the link How to see the Hierarchy view (in my eclipse i see call Hierarchy, Data Hierarchy, Tyoe Hierarchy etc none of them dipslay what I want, what is the difference between above Hierarchies) in the eclpse so that i can see Object--->Throwable--->Exception(orRuntimeException to Unchecked)---->CheckedException


please advise
Any links resources ideas highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
  • 3
  • 2
6 Comments
 
LVL 14

Expert Comment

by:CPColin
ID: 39834126
Please paste the compilation error you're seeing.
0
 
LVL 6

Assisted Solution

by:Mahesh Bhutkar
Mahesh Bhutkar earned 200 total points
ID: 39834935
To See the class hierarchy inside eclipse,
Just select the Classname from editor & press ctrl+T.

You can check the views also from eclipse tools menu for seeing the hierarachy.

Please provide exception that you are getting.
0
 
LVL 7

Author Comment

by:gudii9
ID: 39843042

Also as given in the link How to see the Hierarchy view (in my eclipse i see call Hierarchy, Data Hierarchy, Tyoe Hierarchy etc none of them dipslay what I want, what is the difference between above Hierarchies) in the eclpse so that i can see Object--->Throwable--->Exception(orRuntimeException to Unchecked)---->CheckedException

cntrl+T showed a popup to see the Hierarchy. But how to see that in a physical view rather than disappearing pop up? please advise
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 14

Accepted Solution

by:
CPColin earned 300 total points
ID: 39843061
Go to the menu bar and click "Window / Show View / Other." Then expand "Java" and select "Type Hierarchy." Now you can drag things like packages and classes into that view and see their hierarchies.
0
 
LVL 7

Author Comment

by:gudii9
ID: 39857411
I enabled Type Hierarchy.


How do i drag let us say Exception class to see its Hierarchy. I am not able to drag and drop. Please advise with screenshot if possible
0
 
LVL 7

Author Comment

by:gudii9
ID: 39867885
I see i have to enable  "Type Hierarchy." as below

Go to the menu bar and click "Window / Show View / Other." Then expand "Java" and select "Type Hierarchy."

Then i have to go to my java file in eclipse go to the line below

public class Test {

      public static void main(String[] args) throws IOException {


select IOException  and right click and see option Open in Type Hirerachy or F4 and see on the left hand side the expanded hierarchy displayed.
TypeHierarchy2.jpg
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
thymeleaf natural templating vs JSP 2 100
java jdbc batch example 8 34
runtime exception 2 28
Is Applet the way to go for my drag and drop system? 8 14
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

777 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