Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Java Programming Language Interviews:Advanced JavaCore JavaEclipseFull Stack Developer (Java)HibernateIBM WebSphereInternationalization LocalizationJ2EEJ2MEJ2SEJavaJava ANTJava AppletJava BeansJava ClassesJava EJB ProgrammingJava Game DeveloperJava GUI FrameworkJava JNDIJava JNIJava JSP ProgrammingJava Message Service (JMS)Java Multi-ThreadingJava Networking - Sockets and RMIJava PatternsJava SecurityJava Server FacesJava Servlet ProgrammingJava Software EngineerJava Swing ProgrammingJava TechnicalJava ThreadsJava Transaction APIJava Web ServicesJavaMailJBossJDBCJMSJSFPortal and PortletRMISpring FrameworkSr.Java Web DeveloperStrutsSunOneSwing AWTSWT JFace
Copyright © 2018. All Rights Reserved
Java JNI Interview Question:
Describe exception handling in JNI?
Submitted by: AdministratorJNI exceptions can be handled by using C++ exception handling. Using throw and catch blocks of C++ and invoking those methods through JNI is one of the solutions. JNI has built in functions for handling exceptions, which is a better choice.
The following methods can be used for handling exceptions:
throw() : An exception object is thrown. It is used in native method for rethrowing an exception
throwNew() : Creates a new object of an exception and throws it.
exceptionDescribe() : The stack trace and the exception will be printed
exceptionOccurred() : It is used for determining whether an exception is thrown
exceptionClear() : A pending exception will be cleared
fatalError() : A fatal error is raised and does not return anything.
Submitted by: Administrator
The following methods can be used for handling exceptions:
throw() : An exception object is thrown. It is used in native method for rethrowing an exception
throwNew() : Creates a new object of an exception and throws it.
exceptionDescribe() : The stack trace and the exception will be printed
exceptionOccurred() : It is used for determining whether an exception is thrown
exceptionClear() : A pending exception will be cleared
fatalError() : A fatal error is raised and does not return anything.
Submitted by: Administrator
Copyright 2007-2025 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.