Webservice Interview Questions

The followings are some commonly asked interview questions related to Web Services. These questions are alphabetically sorted. For other interview questions on other technical topics, go to my page here.

  1. Define SOAP?
  2. Explain the web service architecture?
  3. How do you generate web service client from WSDL files?
  4. How do you test a web service?
  5. Name few standards used in web services.
  6. What are some WSDL operations?
  7. What are the common components of web service?
  8. What is a bottom up approach?
  9. What is a provider and a consumer?
  10. What is a response caching?
  11. What is a top down approach?
  12. What is a web service protocol stack?
  13. What is a web service?
  14. What is an end point?
  15. What is REST protocol?
  16. What is SOAP-UI?
  17. What is UDDI?
  18. What is WSDL?
  19. What is XML RPC?
  20. What kinds of tools can you use for creating RESTful Web Services?
  21. Why would you choose REST instead of SOAP?

Core Java Interview Preparation Questions

Interview Questions Categories
Core Java | J2EE | Database | Struts | XML | HTTP | Web Services

I have prepared this list for those of you seeking to appear in Java interview at various companies globally. This post contains a list of core java questions. These are prepared from most frequently asked questions from various software industries. I myself have interviewed over 100 candidates. I have intentionally not provided the solution here. But if you are desperate for one, send me an email via Contact Us link. For other interview questions such as those for J2EE, XML, Database etc and for some sample programming implementations intended to help you to prepare for the interview of tech giants like Google  / Microsoft / Amazon, go to my page here.

The questions below are alphabetically sorted.

  1. Can you instantiate the Math class?
  2. Define Modularity?
  3. Describe synchronization in respect to multithreading. How do you do that Java?
  4. Does it matter in what order catch statements for FileNotFoundException and IOException are written?
  5. Does java support multiple inheritance?
  6. Explain Exception handling in Java.
  7. Explain the difference between overriding and overloading?
  8. Give an example of where you would use Interface not an Abstract Class and vice versa?
  9. How do you do bit manipulation, bitwise operation in Java?
  10. How is polymorphism achieved in java?
  11. How will you get the platform dependent values like line separator, path separator, etc., ?
  12. How will you invoke any external process in Java?
  13. How will you load a specific locale?
  14. In thread, which method resumes the first thread that went into sleep mode?
  15. Is JVM a compiler or an interpreter?
  16. Is Private Method or member variable available to the subclass in the same package?
  17. State the significance of protected and default modifiers.
  18. What are the approaches that you will follow for making a program very efficient?
  19. What are the core OOP’s concepts?
  20. What are the methods in Object?
  21. What does the finalize method do?
  22. What is a base class?
  23. What is a Class?
  24. What is a constructor?
  25. What is a daemon thread?
  26. What is a DatabaseMetaData?
  27. What is a destructor?
  28. What is a final class?
  29. What is a final method?
  30. What is a final variable?
  31. What is a package?
  32. What is a subclass?
  33. What is a superclass?
  34. What is aggregation?
  35. What is an Abstract Class?
  36. What is an Instance?
  37. What is an Interface?
  38. What is an Object?
  39. What is Class.forName() does and how it is useful?
  40. What is collaboration?
  41. What is composition
  42. What is composition?
  43. What is DriverManager?
  44. What is final?
  45. What is Finally? And give an example of how to use it?
  46. What is garbage collection? What is the process that is responsible for doing that in java?
  47. What is inner class?
  48. What is inheritance?
  49. What is JIT and its use?
  50. What is Locale?
  51. What is meant by abstraction?
  52. What is meant by Binding?
  53. What is meant by Dynamic binding?
  54. What is meant by Encapsulation?
  55. What is meant by Inheritance?
  56. What is meant by Object Oriented Programming?
  57. What is meant by Persistence?
  58. What is meant by Polymorphism?
  59. What is meant by static binding?
  60. What is mutable object and immutable object?
  61. What is nested class?
  62. What is pass by reference and pass by value?
  63. What is Polymorphism
  64. What is reflection?
  65. What is singleton?
  66. What is skeleton and stub? what is the purpose of those?
  67. What is static in java?
  68. What is the base class for Error and Exception?
  69. What is the basic difference between String and StringBuffer and StringBuilder object?
  70. What is the byte range?
  71. What is the difference between an Interface and an Abstract class?
  72. What is the final keyword denotes?
  73. What is the impact and usage of Static member variables in Multithreaded programs.
  74. What is the implementation of destroy method in java.. is it native or java code?
  75. What is the major difference between LinkedList and ArrayList?
  76. What is the purpose of assert keyword used in JDK1.4.x?
  77. What is the purpose of garbage collection in Java, and when is it used?
  78. What is the purpose of Void class?
  79. What is the significance of ListIterator?
  80. What kind of thread is the Garbage collector thread?
  81. What operator would you use to compare two String variables?
  82. When you think about optimization, what is the best way to find out the time/memory consuming process?

For other interview preparation questions and materials, go to my page here.

Finding Mean Value Of An Integer Array In Java

In Basic Algebra, mean is nothing but just an average of all the points and is calculated as a sum of all the numbers divided by the total count. Don’t be surprised if you are asked to write a java program that can calculate mean value of an array of integers.

The interviewer might be trying to test your coding style, clean coding ability and ability to think about the boundary conditions and user errors. As you can see in the program below, I have written the method to be fail proof from null value or an empty integer.

package com.icodejava.blog.datastructure;

import java.util.Arrays;

/**
 * @author Kushal Paudyal
 * www.icodejava.com
 * Created On -  Feb 21, 2014
 * Last Modified On - Feb 21, 2014
 * 
 * This class can be used to find the mean value in an array
 */
public class AlgebraMeanFinder {
	
	public static void main(String args []) {
		int [] numbers = {5,5,7,2,3,9,8,9,2,6,7,8,1};
		/**
		 * Finding mean number of a valid integer array
		 */
		findMeanValue(numbers);
		
		/**
		 * Testing for null array
		 */
		findMeanValue(null);
		
		/**
		 * Passing an empty array
		 */
		findMeanValue(new int[] {});
	}

	/**
	 * @param numbers - array of numbers whose mean has to be found
	 * Mean is a simple average value of all numbers.
	 * This method is capable of handling boundary conditions.
	 */
	public static double findMeanValue(int[] numbers) {

		double sum = 0;
		if (numbers == null || numbers.length < 1) {
			System.out.println("\nInvalid Input. Returning 0. Input was:" + Arrays.toString(numbers));
			return sum;
		}

		for (int index = 0; index < numbers.length; index++) {
			sum += numbers[index];
		}

		double mean = (sum / numbers.length);
		System.out.println("\nInput Array is: " + Arrays.toString(numbers));
		System.out.println("Sum:" + sum + " Count:" + numbers.length + " Mean Value is: " + mean);

		return mean;

	}

}

Here is the output of this program.


Input Array is: [5, 5, 7, 2, 3, 9, 8, 9, 2, 6, 7, 8, 1]
Sum:72.0 Count:13 Mean Value is: 5.538461538461538

Invalid Input. Returning 0. Input was:null

Invalid Input. Returning 0. Input was:[]