admin

Set 6 – Java, Oracle, Unix Interview Questions

1. What is the default capacity and increment rate of Vector? 1. 10 and 10 2. 10 and 11 3. 11 and 11 4. 10 and 5 2. What is the return type of add(Object) method of interface Collection? 1. void 2. boolean 3. Object 4. int 3. Choose more appropriate option. currentThread() method of …

Set 6 – Java, Oracle, Unix Interview Questions Read More »

Set 4 – Java, Oracle, Unix Interview Questions

1. What is the index position of element 10 in the Stack? Stack st = new Stack(); st.push(10); st.push(20); st.push(30); 1. 0 2. 1 3. 2 4. 3 2. With what you can fill up the blank so that the output is Hyderabad. List cities = new ArrayList(); cities.add(“Hyderabad”); ——- abc = cities.get(0); System.out.println(abc); 1. …

Set 4 – Java, Oracle, Unix Interview Questions Read More »

Set 3 – Java, Oracle, Unix Interview Questions

1. Which interface is not in the Collection hierarchy? 1. List 2. Set 3. Map 4. Queue 2. What is the output of the following snippet of code? Hashtable ht = new Hashtable(); StringBuffer sb1 = new StringBuffer(“hello”); ht.put(sb1, “sir”); Enumeration e = ht.keys(); while(e.hasMoreElements()) { Object obj1 = e.nextElement(); Object obj2 = ht.get(obj1); System.out.println(obj1 …

Set 3 – Java, Oracle, Unix Interview Questions Read More »

class Date Methods

class Date Methods Summary: By the end of this tutorial "class Date Methods", you will come to know how to use Java Date class methods. Introduction to class Date Methods java.util.Date class constructor is used to print the system date. It comes with many methods to manipulate the date. But these methods are deprecated in …

class Date Methods Read More »

Deprecation Meaning

What is Deprecation Meaning? "Deprecation", warning raised, by the Java compiler, is very common to a Java programmer. It is raised when the programmer uses a method that is found faulty or problematic. A substitute method will be available in the later versions. For example, readLine() method of DataInputStream was deprecated in JDK 1.1 and …

Deprecation Meaning Read More »

class Random Generate random numbers

class Random Generate random numbers Summary: By the time you complete this "class Random Generate random numbers", you will understand of how to generate random numbers in Java. Introduction to class Random Generate random numbers Generating different numbers at different times of execution, by the same program, is known as random number generation. Random numbers …

class Random Generate random numbers Read More »

regionMatches() and intern() String Java

The String class is rich with abundant methods used in coding. One of the methods is overloaded regionMatches() used to find the existence of a few characters of one string in another. Supported methods from String class. boolean regionMatches(int positionFirstString, String secondString, int positionSecondString, int num): Returns a boolean value of true if the region …

regionMatches() and intern() String Java Read More »

Arrays Introduction Tutorial Properties

Arrays Introduction Tutorial Properties Summary: This tutorial "Arrays Introduction Tutorial Properties", discusses arrays properties in simple terms, example code and screenshots. Start reading. Array is a data structure capable to hold data of similar data types. Every language comes with its own rules for arrays. For example, JavaScript and VBScript comes its own set of …

Arrays Introduction Tutorial Properties Read More »

Reference Variables Objects Anonymous objects

Reference Variables Anonymous objects Summary: By the end of this tutorial "Reference Variables Anonymous objects", you will be comfortable in creation of Java objects, reference variables and anonymous objects. Java includes two types of variables – primitive variables and reference variables. A primitive type refers a primitive data type and reference type refers a class. …

Reference Variables Objects Anonymous objects Read More »

Java Naming Conventions Readability

Java Naming Conventions Readability Summary: Unlike C/C++, Java comes with naming conventions to increase the readability of code. This "Java Naming Conventions Readability" explains how to do it. After knowing the rules of identifiers, it is the time to know the another grammar of Java known as "conventions". Conventions increase the readability of the program. …

Java Naming Conventions Readability Read More »