Interview Questions for Freshers
OOPS Concepts What are local and global variables? A variable declared inside a method is known as “local variable” and its usage is limited within the method in which it declared only. A global...
View ArticleJava Font Example
Java AWT supports graphics drawing in colors and fonts. To support colors and fonts, the Java.awt package come with two classes – class Color and class Font. Java Font Example to create font objects...
View ArticleNew Line BufferedWriter Java
New Line BufferedWriter Java uses newLine() method to give new line in the destination file. Example given. But before going into example and explanation, let us see what DataOutputStream will do with...
View ArticleSet 1
1. compareTo(Object) belongs to which class? 1. Collections 2. Comparator 3. Comparable 4. Arrays 2. singletonList(Object) method is defined in? 1. class ArrayList 2. interface List 3....
View ArticleSet 2
1. Following snippet of code [crayon-5dd803c4692cb061446382/] 1. raises compilation error 2. compiles but throws exception 3. compiles, executes and prints all the elements 4. last element is not...
View Article