Java Technology - 2018 - Questions

  • Can we overload main method ?
  • Constructor returns a value but, what ?
  • Can we create a program without main method ?
  • What are the 6 ways to use this keyword ?
  • Why multiple inheritance is not supported in java ?
  • Why use aggregation ?
  • Can we override the static method ?
  • What is covariant return type ?
  • What are the three usage of super keyword?
  • Why use instance initializer block?
  • What is the usage of blank final variable ?
  • What is marker or tagged interface ?
  • What is runtime polymorphism or dynamic method dispatch ?
  • What is the difference between static and dynamic binding ?
  • How downcasting is possible in java ?
  • What is the purpose of private constructor?
  • What is object cloning ?
  • Why String objects are immutable?
  • How to create an immutable class?
  • What is string constant pool?
  • What code is written by the compiler if you concat any string by + (string concatenation operator)?
  • What is the difference between StringBuffer and StringBuilder class?

Exercise:
Fibonacci Series
Factorial Number
Palindrome Check: Number, String (Using StringBuffer/StringReader reverse() operation. String does not have reverse() operation.)

Write a java program to capitalize each word in string?

Write a program to reverse a word. 

 Write a java program to tOGGLE each word in string?

Write a java program reverse tOGGLE each word in string?

10) What is the difference between String and StringBuffer in java?
11) What is the difference between StringBuffer and StringBuilder in java?
12) What does intern() method in java?
13) How to convert String to int in java?
14) How to convert int to String in java?
15) How to convert String to Date in java?
16) How to Optimize Java String Creation?
17) Java Program to check whether two Strings are anagram or not
18) Java program to find the percentage of uppercase, lowercase, digits and special characters in a String
19) How to convert String to Integer and Integer to String in Java
20) Java Program to find duplicate characters in a String
21) Java Program to prove that strings are immutable in java
22) Java Program to remove all white spaces from a String
23) Java Program to check whether one String is a rotation of another
24) Java Program to count the number of words in a String
25) Java Program to reverse a given String with preserving the position of space
26) How to swap two String variables without third variable
27) How to remove a particular character from a String

  • What are the two ways to iterate the elements of a collection ?
  • What is the difference between ArrayList and LinkedList classes in collection framework?
  • What is the difference between ArrayList and Vector classes in collection framework?
  • What is the difference between HashSet and HashMap classes in collection framework?
  • What is the difference between HashMap and Hashtable class?
  • What is the difference between Iterator and Enumeration interface in collection framework?
  • How can we sort the elements of an object. What is the difference between Comparable and Comparator interfaces?
  • What does the hashcode() method ?
  • What is the difference between java collection and java collections ?




Comments

Popular posts from this blog

Jersey JAX RS Jar

Tomcat Installation Steps for Windows & add tomcat to eclipse

REST API