Solved

checked and unchecked exception

Posted on 2014-02-04
6
296 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
[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
  • 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
Turn Insights Into Action

You’ve already invested in ITSM tools, chat applications, automation utilities, and more. Fortify these solutions with intelligent communications so you can drive business processes forward.

With xMatters, you'll never miss a beat.

 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to implement Singleton Design Pattern in Java.

717 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