?
Solved

checked and unchecked exception

Posted on 2014-02-04
6
Medium Priority
?
301 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 800 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 14

Accepted Solution

by:
CPColin earned 1200 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

RHCE - Red Hat OpenStack Prep Course

This course will provide in-depth training so that students who currently hold the EX200 & EX210 certifications can sit for the EX310 exam. Students will learn how to deploy & manage a full Red Hat environment with Ceph block storage, & integrate Ceph into other OpenStack service

Question has a verified solution.

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

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses
Course of the Month14 days, 13 hours left to enroll

771 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