.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

A method in a Java class contains code that might result in an exception. Which of the following keyword will you use in the method to indicate that the calling method should handle the exception?

Posted By :Nikhil Kumar     Posted Date :August 30, 2010    Points :10   Category :.NET Framework 
1, throw
2, throws
3, try
4, this

Answer : 2

You can also find related Interview Question to A method in a Java class contains code that might result in an exception. Which of the following keyword will you use in the method to indicate that the calling method should handle the exception?  below: 

What is The Difference Between Final variable,method,class IN Java.

  
Final variable - Like Constant.
Final method - Can't overridden.
Final class - Can't Inherited by Any other Class (More...)

Can we call a base class method without creating instance?

  
Its possible If its a static method.

Its possible by inheriting from that class also.

Its possible from derived classes using base keyword. (More...)

How can I look up a parent class method or property of any System-level object?

  
Use the Class View window, accessed from the standard toolbar by clicking View | Class View. (More...)

Why is it not a good idea to insert code into InitializeComponent method when working with Visual Studio?

  
The designer will likely throw it away; most of the code inside InitializeComponent is auto-generated. (More...)

Can you allow class to be inherited, but prevent the method from being over-ridden?

  
Yes, just leave the class public and make the method sealed. (More...)

Which method is used to serialize an object into an XML document from Xmlserializer class?

  
The "Serialize" method is the first step of serialize process and used to create an XML document (More...)

To define abstract method which keyword is used in VB?

  
MustOverride keyword is used to define an abstract method in VB. (More...)

In a Java multithreading program, under what circumstances will you call the yield() method of a thread?

  
1, To give other runnable threads a chance to execute.
2, To start a new thread.
3, To terminate the current thread.
4, To stop the current thread for a specific time.

Answer : 1 (More...)

Name the Method of ServiceBase class?

  
The following are the methods of ServiceBase class.

· OnStart

· OnStop

· OnPause

· OnContinue

· OnShutdown

· OnPowerEvent

· OnCustomCommand (More...)

How can you access a private method of a class?

  
Use .Net Reflection. Using reflection we can invoke private methods too.

Example:

Car car = new Car();
Type type = car.GetType();
MethodInfo methodInfo = type.GetMethod("ShiftGearUp", BindingFlags.NonPublic | BindingFlags.Instance);
methodInfo.Invoke(car, null);

Pre: Create a class Car with private method "ShiftGearUp" (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend