Gadgets

Saturday, 27 February 2016

Regular Expression interview questions

If we represent a group of string objects according to particular patter is called “Regular Expression”. By using Regular Expression we can develop validations and pattern matching etc. Here I have given interview questions on regular expression with examples.
1) What is the Regular Expression?
If we represent a group of string objects according to particular patter is called “Regular Expression”.
import java.util.regex.*;
public class RegularExpres  {
                    public static void main(String[] args)  {
                                         int count=0;
                                         Pattern p=Pattern.compile("a");
                                         Matcher m=p.matcher("abcdabc");
                                         while(m.find()) {
                                                             count++;
                                         System.out.println(m.start()+" "+m.end()+" "+m.group());
                                         }
System.out.println("total : " +count);
                    }
}

OOPs Interview questions

Java is Object Oriented Programming language, in this page I given interview questions on OOPs concept. The OOPs concepts are very basic concepts in java.
1) Why java is Object Oriented Programming language?
Java is object based, it is consider the data in object form. Here we have some topics to say java is Object Oriented Programming language.
·        Abstraction
·        Encapsulation
·        Inheritance
·        Polymorphism etc.

Friday, 19 February 2016

Interview questions on java source file

Interview questions on java source file structure. In this article i provided not only interview questions, i given explanation in program and diagrammatically for each and every question. this article is useful to quick reference also.  
1) Can a java Program contain multiple classes?
Yes, a java program contain multiple classes as shown in the below program.

Thursday, 18 February 2016

Java language fundamentals

Every java programer must know the java language fundamentals. Here I have given java language fundamentals frequent asking questions. Java Language fundamentals contain basic topics of java.

Interface interview questions

Generally meaning of interface is mediator between two objects to communicate each other.
Interface: Any service requirement specification (or) any contract between client and service provider (or) 100% pure abstract class is known as interface.

JDBC interview questions

JDBC stands for Java Database Connectivity. JDBC is a Java API that is used to connectivity between java programming language and database. JDBC API uses JDBC drivers to connect to the database.

Exception handling interview questions

An unwanted, unexpected event that disturbs the normal flow of program is called Exception. Exception handling doesn’t mean repair an exception; it provides the alternative solution to continue the rest of the program normally.
Here I provided most common frequently asking questions on Exception Handling.

Garbage collection interview questions and answers

Garbage Collector is used to destroy the useless objects. Generally java programmer is responsible to create object but programmer is no need to delete the object after usage. JVM will call the Garbage collector and it is responsible to delete that object.

enum interview questions and answers

enum is introduced in J2SE-5 version, we can represent a group of named constants by using enum. The main objective of enum is to define our own datatypes.

                         enum Week
                         {
                                      SUN,MON,TUS,WED,THU,FRI,SAT;
                         }

java.lang package interview questions

java.lang package is most commonly required package for every java class, most of the commonly required classes and interface are grouped into java.lang package. This package (java.lang) is not required to import explicitly, because it is by default available to every java program.

java.io package interview questions

java.io package contain all the required classes and interface for the input and output process. This java.io package is provides to process the input and produce the output, by using this java.io package we can perform the File input and output operations.
File, FileReader, BufferedReader, Filewriter, BufferedWriter and PrintWriter are very common classes for the File I/O operations.
Here I provided the frequent asking questions from the File I/O operations topic.

Wednesday, 27 January 2016

Hibernate Interview Questions and Answers

1. What is Hibernate?
Hibernate framework simplifies the development of java application to interact with the database. Hibernate is an open source and lightweight ORM (Object Relational Mapping) tool.

2. What is ORM?
ORM stands for Object Relational Mapping. ORM tool simplifies the data creation, data manipulation and data access. It is a programming technique that maps the object to the data stored in the database.

Monday, 25 January 2016

JSP Interview questions and answer

1. What is JSP?
JSP stands for Java Server Pages. JSP is java server side technology to create dynamic web pages
JSP file compiled by JSP container and convert it into servlet file.