Searching for "subroutine"

Q:

In Computer programming API is set of subroutinedefinitions, protocols, and tools for building software andapplications. Which among the following is an applicationprogramming interface for the programming language Java,which defines how a client may access a database?

A) J2EE B) JDK
C) JAVA SE D) JDBC
 
Answer & Explanation Answer: D) JDBC

Explanation:

Java Database Connectivity (JDBC) is an applicationprogramming interface (API) for the programminglanguage Java, which defines how a client may accessa database. It is part of the Java Standard Editionplatform, from Oracle Corporation

Report Error

View Answer Report Error Discuss

Filed Under: Computer
Exam Prep: Bank Exams

Q:

In Computer programming there is set of subroutinedefinitions, protocols, and tools for building software andapplications. Which among the following is a term for setsof requirements that govern how one application can talkto another?

A) UPS B) API
C) CGI D) J2EE
 
Answer & Explanation Answer: B) API

Explanation:

An API may be for a web-based system, operatingsystem, database system, computer hardware, orsoftware library. It is an acronym for ApplicationProgramming Interface. An API specifies how softwarecomponents should interact and APIs are used whenprogramming graphical user interface (GUI)components.

Report Error

View Answer Report Error Discuss

Filed Under: Computer
Exam Prep: Bank Exams

Q:

In the JCL, how do you define the files referred to in a subroutine ?

Answer

Supply the DD cards just as you would for files referred to in the main program.

Report Error

View answer Workspace Report Error Discuss

Q:

You develop a Windows-based application that enables to enter product sales. You add a subroutine named XYZ.

 

You discover that XYZ sometimes raises an IOException during execution. To address this problem you create two additional subroutines named LogError and CleanUp. These subroutines are governed by the following rules:

• LogError must be called only when XYZ raises an exception.
• CleanUp must be called whenever XYZ is complete.

 

 You must ensure that your application adheres to these rules. Which code segment should you use?

A) try { XYZ(); LogError(); } catch (Exception e) { CleanUp(e); } B) try { XYZ(); } catch (Exception e) { LogError(e); CleanUp(); }
C) try { XYZ(); } catch (Exception e) { LogError(e); } finally { CleanUp(); } D) try { XYZ(); } catch (Exception e) { CleanUp(e); } finally { LogError(); }
 
Answer & Explanation Answer: C) try { XYZ(); } catch (Exception e) { LogError(e); } finally { CleanUp(); }

Explanation:

We must use a try…catch…finally construct. First we run the Comapany() code in the try block.Then we use the LogError() subroutine in the catch statement since all exceptions are handled here. Lastly we put the CleanUp() subroutine in the finally statement since this code will be executed regardless of whether an exception is thrown or not.

Report Error

View Answer Report Error Discuss