Java Interview Questions pdf download || Coding Tag

Page 1

JAVA Interview Questions

By: Coding Tag


About Us

About Coding Tag Coding Tag is the E-learning website covering all tutorials of technical and nontechnical tutorials including advanced programming , web Development,current affairs and Technical interviews.... In Coding tag , It’s the outstanding reference platform for Interview questions as well on :-

In this presentation you will learn about latest frequentlyCSS asked Interview relatedOOPS to JavaAjax and HTML PHPquestions SQL C C++ Advance Java. Python etc... More info related to TOP Java Interview questions and Answers

JS 2


What are the features in Java? Java Programming Language is a lot more than just a usual programming language It is also a multi-platform,which is with inbuilt security to prevent hacking Here are some features that make java different from other languages: ● ● ● ●

Robustness nature Platform Independency Global operative No Explicit memory management


Name some of the Java IDE’s. IDE stands for Integrated Development Environment It is an environment that have a lot of classes functions in a single package i.e code editor, compiler, debugger etc… Some IDE’s are: ● ● ● ●

NetBeans Eclipse Intellij IDEA DrJava


What is the difference between Hashmap and Hashtable. HashMap ● No synchronization of methods ● Iterator is used to iterate the values ● There is no thread safety ● HashMap extends an abstract class Abstract Map ● Allows null key only once and multiple null values

HashTable ● Key methods are synchronization ● Nothing with null attribute is allowed ● Thread safety ● The Enumerator is used to iterate the values ● Slower performances


How to read text from Inputstream in Java? Java provides several mechanisms in order to read from a file. One important class that helps in performing this operation is the BufferedReader. BufferedReader is a Java class that reads text from the input stream. It buffers the characters so that it can get the efficient reading of characters, arrays, etc. It inherits the reader class and makes the code efficient since we can read the data line-by-line with the readline() method public static void main(String args[] throws Exception) { FileReader f = new FileReader("file location"); BufferedReader b = new BufferedReader(f); while((int i = b.read()) != -1){ System.out.println((char) i); } b.close(); f.close();


Difference between Scanner and BufferedReader. BufferedReader

● Synchronous and should be used with multiple threads ● Buffer Memory is large ● Faster than scanner ● Uses buffering to read characters from the character input stream

Scanner

● Not synchronous and not used with multiple threads ● Buffer Memory is smaller ● Does parsing of the input data ● It is a simple text scanner ,parses strings and primitive types


What is Linked list in Java? In java Linked list class is a doubly linked list implementation of list and Deque interfaces. Linked list Class Declaration, Linked list is a generic class that has this declaration: Public class LinkedList<E> Extends AbstractSequentialList<E> Implements List<E>, Deque<E> ,Cloneable<E>


Than ks!

Any questions? You can find me at codingtag.com

9


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.