These question are the basic questions for Interview based on Java language. These questions are able to crack the interview based on java language
Learn more at blog : --
https://solutionbyexpert.blogspot.com/2020/08/become-expert-secret-of-success-ii.html
#coding
#coding development skill program
#java
The document contains 60 interview questions and answers related to Java. Some key topics covered include:
- The Java Virtual Machine (JVM) and differences between JDK and JVM
- Platform independence and access modifiers in Java
- Inheritance, polymorphism, and abstraction
- Exceptions and exception handling
- Threads and concurrency
- JDBC and database connectivity
- Servlets, JSP, and web technologies
- Object-oriented programming concepts like classes, objects, methods, and constructors.
The questions progress from basic Java concepts to more advanced topics like RMI, EJBs, and memory management.
This document contains 50 Java interview questions and answers related to core Java concepts like OOPs, multi-threading, collections etc. Some key questions include differences between HashMap and Hashtable, wait and notify methods, pass-by-value vs pass-by-reference in Java, difference between transient and volatile keywords, difference between association, composition and aggregation etc. The questions cover important topics that are commonly asked in Java interviews at companies like Google, Microsoft and Adobe.
What are the top 10 Java Interview Questions and Answers in 2014? Based on the most popular java questions asked in interview, we've compiled a list of the 10 most popular java interview questions in 2014.
Appearing for a java interview is not easy but if you brush up enough fundamentals, then you can easily crack the interview. The above questions are the most popular java interview questions asked by major companies so make sure to download this pdf.
This list includes java interview questions in the below categories:
top 10 java interview questions
top 10 java interview questions and answers
10 most popular interview questions
core java interview questions and answers
basic java interview questions and answers
serialization in java interview questions
core java interview questions pdf
multithreading in java interview questions
advanced java interview questions and answers
top 10 java interview questions and answers for freshers
top 100 java interview questions and answers
java interview questions and answers pdf
java interview questions and answers for freshers
java interview questions and answers for experienced
java interview questions and answers for 3 years experience
java interview questions and answers pdf download
java collections interview questions and answers
This document outlines the contents of a book on Java/J2EE interview questions and answers. It covers key topics like Java language fundamentals, Swing, Applets, J2EE, Servlets, JSP, EJB, JDBC, XML and more. The book provides sample questions and answers on these topics that may be asked in interviews. It also has sections on emerging technologies, sample questions, and how to approach common tasks like application design, documentation, performance tuning and security. The goal is to help readers prepare for Java/J2EE related job interviews.
This document contains 15 technical interview questions and answers about various programming concepts in C/C++. The questions cover topics such as the differences between String, StringBuffer and StringBuilder classes, access modifiers like public, private and protected, pointers, friend functions, constructors, operator overloading, function overloading, inline functions, inheritance, abstraction, encapsulation, recursion, structures, nested structures, and pointers to pointers.
BEA Weblogic Interview Questions And Answers provides a guide to preparing for a BEA Weblogic job interview. It includes sample questions and answers about BEA Weblogic, such as what BEA Weblogic is, why polymorphic responses are not allowed from create() or find() methods in EJBs, and how to set up the CLASSPATH correctly. The document provides explanations and recommendations for various BEA Weblogic concepts and configuration issues.
Crack your Java interview by knowing all the questions that your interviewer may ask. Brush up your knowledge with this superb set of Java interview questions & answers prepared by BestOnlineTrainers
Java Interview Questions and Answers | Spring and Hibernate Interview Questio...Edureka!
This Edureka Java Interview Questions and Answers tutorial will help you to prepare yourself for Java Interviews ( Java Interview Questions Blog: https://goo.gl/GY3yTR ). Learn about the most important Java interview questions and answers and know what will set you apart in the interview process.
This tutorial covers Java Interview Questions on:
1) Basic Java Questions
2) OOPS Questions
3) Servlets
4) JDBC
5) Spring
6) Hibernate
The document discusses various topics related to object-oriented concepts, UML, C++, Java, Visual Basic, networking, operating systems, and interview questions. It includes over 35 questions on each topic, covering concepts like inheritance, polymorphism, design patterns, class diagrams, data structures, sockets, threads, processes, memory management, file systems and more.
8 most expected java interview questionsPoonam Kherde
This document lists the 8 most common Java interview questions. It discusses questions about the Java Virtual Machine (JVM), platform independence in Java, abstract classes, packages, thread states including ready, running, waiting and dead, deadlocks, the most important feature of Java being platform independence, and the base class for all classes being java.lang.Object. The document provides brief explanations and definitions for each interview question.
ORM stands for Object/Relational mapping. It is the programmed and translucent perseverance of objects in a Java application in to the tables of a relational database using the metadata that describes the mapping between the objects and the database. An ORM solution comprises of an API for CRUD operations, a language for specifying queries, ability to specify mapping metadata, and techniques for interacting with transactional objects. There are four levels of ORM quality ranging from pure relational to full object mapping.
9 crucial Java Design Principles you cannot missMark Papis
Encapsulation, Polymorphism, Agreggation / Composition, Overloading, Inheritance vs Composition, DRY, Dependency Injection, Delagation, Law of demeter, Principle of leas knowledge,
The document discusses JPA/Hibernate, object-relational mapping, and web services. It defines Hibernate as an open source ORM for Java that makes data persistent by storing it in a database. It notes that Hibernate automatically generates SQL queries and reduces development time compared to manually handling data with JDBC. The architecture of Hibernate and web services is described, including how Hibernate sits between code and the database to map objects to tables. Common web service types like SOAP and REST are also summarized.
The document provides information about preparing for a technical interview, including:
- Check the company profile, areas of interest, and domain to understand what may be asked.
- Be prepared to discuss your fundamental computer engineering knowledge as well as one or two subjects you are interested in and knowledgeable about.
- Also prepare to discuss your past project work and the latest technologies.
- Key topics that may be covered include C, C++, data structures, algorithms, databases, operating systems, networks, and various programming languages.
- Understanding pointers, memory allocation functions, structures, unions, classes, inheritance and polymorphism in C/C++ is also important for technical interviews.
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaEdureka!
This Edureka "What Is Java" tutorial will help you in understanding the various fundamentals of Java in detail with examples. Below are the topics covered in this tutorial:
1) What is Java?
2) Where is Java used?
3) Features of Java
4) Java Environment
5) How does Java work?
6) Data Types in Java
7) Operators in Java
8) Functions in Java
9) Object Oriented Concepts in Java
In this presentation we introduce topic of core java that is required to learn if you want to be good java programmer. i provide all concept in detail.
Java Programming | Java Tutorial For Beginners | Java Training | EdurekaEdureka!
The document outlines the agenda and content for a Java certification training course. It covers key Java concepts like variables, data types, operators, conditional statements, loops, functions, classes and objects. The training will also cover installing Java and Eclipse, and demonstrate variables, data types, arithmetic operators, relational operators, logical operators, if/else statements, switch statements, for, while and do-while loops, arrays, strings, functions, and classes and objects in Java.
java tutorial for beginner - Free DownloadTIB Academy
TIB Academy offering Java tutorial with fundamental for beginner This Java Tutorial going to explain about the fundamentals of Core Java Concepts, you can download Java tutorial as PPT for free of cost
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...Edureka!
** Java Certification Training: https://www.edureka.co/java-j2ee-soa-... **
This Edureka PPT on “Java Tutorial For Beginners” will give you a brief insight about Java and its various fundamental concepts along with their practical implementation. Through this tutorial, you will learn the following topics:
1. Introduction to Java
2. JVM vs JRE vs JDK
3. Java Fundamentals
4. Objects & Classes
5. Methods & Access Modifiers
6. Flow Of Control
7. Java Arrays
This document provides an overview of key concepts in Java including classes, objects, class members, packages, constructors, interfaces, abstract classes, object-oriented programming characteristics like encapsulation, inheritance, polymorphism and abstraction. It also discusses overriding, overloading, non-access modifiers, passing variables and strings. The presentation contains definitions and examples to explain each concept in 1-3 sentences.
The document provides an overview of the Java programming language. It discusses that Java was developed in the early 1990s by Sun Microsystems. It then summarizes some of Java's main features, including that it is a simple, object-oriented, robust, distributed, platform independent, secured, architecture-neutral, portable, high-performance, multi-threaded, and dynamic language. It also briefly discusses the Java Virtual Machine, Java Runtime Environment, Java Development Kit, Java bytecode, and the main method.
Java was created to address issues with C/C++ by being portable, platform-independent, and secure. It was developed by James Gosling at Sun Microsystems in 1995. Key features of Java include being object-oriented, portable, robust, secure, and having automatic memory management. Java is different from C/C++ in that it does not support pointers, structures, unions, or multiple inheritance.
This document provides a quick reference guide for J2SE (Core Java). It covers various topics related to Java programming including Java history, features, programming structure, data types, control structures, OOP concepts, exceptions, threads, GUI programming and more. The guide was written by A.R. Kishore Kumar and is intended to be a concise yet comprehensive overview of the Java language.
The document discusses various Hibernate concepts and configuration options. It contains answers to frequently asked Hibernate interview questions organized in a question and answer format. The questions cover core Hibernate interfaces, the difference between various session methods like save(), saveOrUpdate(), and persist(), lazy fetching and its configuration, the advantages of Hibernate over JDBC, what C3P0 is and how to configure it, dirty checking in Hibernate, and the different fetch strategies in Hibernate.
This document provides an introduction to object-oriented programming (OOP) concepts and the Java programming language. It discusses the key concepts of OOP like objects, classes, inheritance, polymorphism, abstraction and encapsulation. It then describes the creation of Java, its versions and types of Java programs. The document also explains Java's buzzwords like simple, object-oriented, platform independent, robust, secure, high-performance, portable and distributed. Finally, it briefly introduces the Java Runtime Environment and Java Development Kit.
This document provides information about a CS 213 object oriented programming course in Java. It lists the instructors, lecture times and groups, assessment model, and course outline. The outline covers an overview of Java, basic syntax including classes, objects, and methods, variables, operators, loops, strings, arrays, exceptions, inheritance, polymorphism, and more. It also includes documentation on Java identifiers, keywords, comments, modifiers, and variables.
This document provides an overview of the Java programming language. It discusses the history and origins of Java, defines what Java is, and lists some of its common uses. It then provides reasons for using Java, including that it works on multiple platforms, is one of the most popular languages, is easy to learn, is open-source, and has a large community. The document also introduces key Java concepts like syntax, variables, data types, classes and objects, inheritance, and packages.
Java Interview Questions and Answers | Spring and Hibernate Interview Questio...Edureka!
This Edureka Java Interview Questions and Answers tutorial will help you to prepare yourself for Java Interviews ( Java Interview Questions Blog: https://goo.gl/GY3yTR ). Learn about the most important Java interview questions and answers and know what will set you apart in the interview process.
This tutorial covers Java Interview Questions on:
1) Basic Java Questions
2) OOPS Questions
3) Servlets
4) JDBC
5) Spring
6) Hibernate
The document discusses various topics related to object-oriented concepts, UML, C++, Java, Visual Basic, networking, operating systems, and interview questions. It includes over 35 questions on each topic, covering concepts like inheritance, polymorphism, design patterns, class diagrams, data structures, sockets, threads, processes, memory management, file systems and more.
8 most expected java interview questionsPoonam Kherde
This document lists the 8 most common Java interview questions. It discusses questions about the Java Virtual Machine (JVM), platform independence in Java, abstract classes, packages, thread states including ready, running, waiting and dead, deadlocks, the most important feature of Java being platform independence, and the base class for all classes being java.lang.Object. The document provides brief explanations and definitions for each interview question.
ORM stands for Object/Relational mapping. It is the programmed and translucent perseverance of objects in a Java application in to the tables of a relational database using the metadata that describes the mapping between the objects and the database. An ORM solution comprises of an API for CRUD operations, a language for specifying queries, ability to specify mapping metadata, and techniques for interacting with transactional objects. There are four levels of ORM quality ranging from pure relational to full object mapping.
9 crucial Java Design Principles you cannot missMark Papis
Encapsulation, Polymorphism, Agreggation / Composition, Overloading, Inheritance vs Composition, DRY, Dependency Injection, Delagation, Law of demeter, Principle of leas knowledge,
The document discusses JPA/Hibernate, object-relational mapping, and web services. It defines Hibernate as an open source ORM for Java that makes data persistent by storing it in a database. It notes that Hibernate automatically generates SQL queries and reduces development time compared to manually handling data with JDBC. The architecture of Hibernate and web services is described, including how Hibernate sits between code and the database to map objects to tables. Common web service types like SOAP and REST are also summarized.
The document provides information about preparing for a technical interview, including:
- Check the company profile, areas of interest, and domain to understand what may be asked.
- Be prepared to discuss your fundamental computer engineering knowledge as well as one or two subjects you are interested in and knowledgeable about.
- Also prepare to discuss your past project work and the latest technologies.
- Key topics that may be covered include C, C++, data structures, algorithms, databases, operating systems, networks, and various programming languages.
- Understanding pointers, memory allocation functions, structures, unions, classes, inheritance and polymorphism in C/C++ is also important for technical interviews.
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaEdureka!
This Edureka "What Is Java" tutorial will help you in understanding the various fundamentals of Java in detail with examples. Below are the topics covered in this tutorial:
1) What is Java?
2) Where is Java used?
3) Features of Java
4) Java Environment
5) How does Java work?
6) Data Types in Java
7) Operators in Java
8) Functions in Java
9) Object Oriented Concepts in Java
In this presentation we introduce topic of core java that is required to learn if you want to be good java programmer. i provide all concept in detail.
Java Programming | Java Tutorial For Beginners | Java Training | EdurekaEdureka!
The document outlines the agenda and content for a Java certification training course. It covers key Java concepts like variables, data types, operators, conditional statements, loops, functions, classes and objects. The training will also cover installing Java and Eclipse, and demonstrate variables, data types, arithmetic operators, relational operators, logical operators, if/else statements, switch statements, for, while and do-while loops, arrays, strings, functions, and classes and objects in Java.
java tutorial for beginner - Free DownloadTIB Academy
TIB Academy offering Java tutorial with fundamental for beginner This Java Tutorial going to explain about the fundamentals of Core Java Concepts, you can download Java tutorial as PPT for free of cost
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...Edureka!
** Java Certification Training: https://www.edureka.co/java-j2ee-soa-... **
This Edureka PPT on “Java Tutorial For Beginners” will give you a brief insight about Java and its various fundamental concepts along with their practical implementation. Through this tutorial, you will learn the following topics:
1. Introduction to Java
2. JVM vs JRE vs JDK
3. Java Fundamentals
4. Objects & Classes
5. Methods & Access Modifiers
6. Flow Of Control
7. Java Arrays
This document provides an overview of key concepts in Java including classes, objects, class members, packages, constructors, interfaces, abstract classes, object-oriented programming characteristics like encapsulation, inheritance, polymorphism and abstraction. It also discusses overriding, overloading, non-access modifiers, passing variables and strings. The presentation contains definitions and examples to explain each concept in 1-3 sentences.
The document provides an overview of the Java programming language. It discusses that Java was developed in the early 1990s by Sun Microsystems. It then summarizes some of Java's main features, including that it is a simple, object-oriented, robust, distributed, platform independent, secured, architecture-neutral, portable, high-performance, multi-threaded, and dynamic language. It also briefly discusses the Java Virtual Machine, Java Runtime Environment, Java Development Kit, Java bytecode, and the main method.
Java was created to address issues with C/C++ by being portable, platform-independent, and secure. It was developed by James Gosling at Sun Microsystems in 1995. Key features of Java include being object-oriented, portable, robust, secure, and having automatic memory management. Java is different from C/C++ in that it does not support pointers, structures, unions, or multiple inheritance.
This document provides a quick reference guide for J2SE (Core Java). It covers various topics related to Java programming including Java history, features, programming structure, data types, control structures, OOP concepts, exceptions, threads, GUI programming and more. The guide was written by A.R. Kishore Kumar and is intended to be a concise yet comprehensive overview of the Java language.
The document discusses various Hibernate concepts and configuration options. It contains answers to frequently asked Hibernate interview questions organized in a question and answer format. The questions cover core Hibernate interfaces, the difference between various session methods like save(), saveOrUpdate(), and persist(), lazy fetching and its configuration, the advantages of Hibernate over JDBC, what C3P0 is and how to configure it, dirty checking in Hibernate, and the different fetch strategies in Hibernate.
This document provides an introduction to object-oriented programming (OOP) concepts and the Java programming language. It discusses the key concepts of OOP like objects, classes, inheritance, polymorphism, abstraction and encapsulation. It then describes the creation of Java, its versions and types of Java programs. The document also explains Java's buzzwords like simple, object-oriented, platform independent, robust, secure, high-performance, portable and distributed. Finally, it briefly introduces the Java Runtime Environment and Java Development Kit.
This document provides information about a CS 213 object oriented programming course in Java. It lists the instructors, lecture times and groups, assessment model, and course outline. The outline covers an overview of Java, basic syntax including classes, objects, and methods, variables, operators, loops, strings, arrays, exceptions, inheritance, polymorphism, and more. It also includes documentation on Java identifiers, keywords, comments, modifiers, and variables.
This document provides an overview of the Java programming language. It discusses the history and origins of Java, defines what Java is, and lists some of its common uses. It then provides reasons for using Java, including that it works on multiple platforms, is one of the most popular languages, is easy to learn, is open-source, and has a large community. The document also introduces key Java concepts like syntax, variables, data types, classes and objects, inheritance, and packages.
This document provides information about Java programming questions that are commonly asked in interviews and exams. It lists 30 Java programming questions and their answers on topics like OOPs concepts, multithreading, exceptions, JDBC, serialization and more. The document also provides links to connect with the authors on social media and messaging platforms like WhatsApp, Telegram, Facebook, Twitter etc. for any doubts or feedback. It reminds the reader to practice all the questions well to build a clear understanding of concepts and score well in exams.
Priyanka Pradhan presents an introduction to the Java programming language. Java is an object-oriented language that is platform independent. The document discusses what Java is, the tools needed like the JDK and text editor, how to set the path and compile/run a "Hello World" program. It also covers Java concepts like classes, objects, inheritance, interfaces, and the basics of creating objects and using constructors.
The document provides an introduction to programming with core Java. It discusses Java terminology like the Java Virtual Machine, Java Development Kit, and Java Runtime Environment. It also covers Java variables and data types, operators, strings, arrays, classes and objects, constructors, polymorphism, keywords like static, this, abstract, super, and final. It lists features of Java 8 and some common applications developed using Java like Spotify, Twitter, and Signal. The conclusion reflects on the learning experience of working with core Java concepts.
Java is an object-oriented programming language initially developed by Sun Microsystems. It is platform independent because the Java code is compiled into bytecode, which can run on any Java Virtual Machine (JVM). Java is considered more secure than other languages because it does not use pointers, handles memory allocation automatically through garbage collection, and catches errors at compile-time. The key differences between C and Java are that Java does not support pointers, global variables, or preprocessor directives and it has automatic memory management and strict object-oriented approach.
The document discusses the fundamentals of object-oriented programming and Java. It covers key concepts like abstraction, encapsulation, inheritance and polymorphism. It also describes the basic structure of a Java program, including classes, objects, methods and variables. It explains how to set up a Java development environment, compile and run a simple Java program.
This document provides an overview of object-oriented programming concepts and the Java programming language. It discusses how classes will be structured in the course, compares object-oriented and procedural programming approaches, and lists advantages of OOP. It then introduces Java, covering its design goals, features, and development environments. Finally, it explains how to build a basic Java class, including class headers, identifiers, blocks of code, indentation, and methods.
Brainsmartlabs provides free online Java and SQL courses to help IT beginners learn the basics and advance their skills, offering unique teaching methods through practical examples and assignments. Their courses cover foundational concepts like classes, objects, methods, and inheritance in Java as well as different Java platforms and applications. Learners are encouraged to join Brainsmartlabs' affordable programs to build expertise in these languages and improve their careers.
This document provides an overview of object-oriented programming concepts in Java including abstraction, encapsulation, inheritance, and polymorphism. It discusses key Java concepts like classes, objects, methods, and access specifiers. It also covers Java fundamentals like variables, data types, operators, control flow statements, comments, and arrays. Additionally, it describes the Java runtime environment, how to set up a Java development environment, compile and run a simple Java program. The document is intended as an introduction to object-oriented programming and the Java programming language.
Introduction to oop and java fundamentalsAnsgarMary
This document provides an introduction to object-oriented programming concepts in Java, including classes, objects, inheritance, polymorphism, abstraction, and encapsulation. It then discusses the Java programming environment, fundamental programming structures in Java like data types, variables, operators, control flow statements, and arrays. Key characteristics of the Java language are also summarized.
This presentation provides an introduction to Java programming, covering key concepts like object-oriented programming (OOP) principles of objects, classes, inheritance, polymorphism, abstraction, and encapsulation. It also discusses Java features like platform independence and portability. Additionally, it defines common Java elements like data types, variables, methods, constructors, and operators.
Dev labs alliance top 20 basic java interview questions for sdetDevLabs Alliance
The document provides 20 basic Java interview questions for software development engineers. It covers topics like access specifiers, object-oriented programming principles, the differences between inner classes and subclasses, final keyword usage, abstract classes vs interfaces, local vs instance variables, constructor types, exception handling, threads, method overloading and overriding, collections, and checked vs unchecked exceptions.
Dev labs alliance top 20 basic java interview question for sdetdevlabsalliance
The document provides 20 basic Java interview questions for software development engineers in test (SDET) roles. The questions cover topics such as Java access specifiers, object-oriented programming principles, the differences between classes and interfaces, exception handling, threads, collections, and more. The questions are multiple choice or short answer and include explanations of concepts in Java.
The document provides 20 basic Java interview questions for software development engineers in test (SDET) roles. The questions cover topics such as Java access specifiers, object-oriented programming principles, the differences between inner classes and subclasses, overloading and overriding methods, threads and exceptions, and collections. The document is intended to help SDETs prepare for technical interviews by providing example questions and explanations of core Java concepts.
This document provides an overview of test automation using Selenium. It discusses reasons to automate testing such as supporting regression testing and finding defects missed by manual testing. It also discusses when not to automate, such as when an application's behavior is unstable. The document then covers the Selenium framework, its components like Selenium IDE and WebDriver, and languages it supports like Java. It also discusses concepts in object-oriented programming relevant to test automation like classes, objects, inheritance and more.
This document is an industrial training report submitted by students to fulfill the requirements of a Bachelor of Technology degree in computer science and engineering. It contains an introduction to key Java concepts such as what Java is, its basic syntax including identifiers, arrays, enums, and keywords. It also discusses object-oriented programming concepts in Java like inheritance, interfaces, constructors, and access specifiers. The report is divided into chapters that cover these concepts in further detail along with other OOP principles like polymorphism and abstraction.
AWS Lambda is considered to be a proficient serverless computing service that allows you to run your code for managing servers and containers. The scaling under AWS Lambda is done automatically by measuring the work intensity integrated onto it. There are several use cases to AWS Lambda that define its prime efficacy of executing code within the AWS cloud. Even though AWS Lambda is meant to be used within the cloud, local development attributes can also use it for diverse development needs. For further reading please visit https://www.whizlabs.com/blog/use-of-aws-lambda/
AWS Lambda Documentation over the official website of AWS is highlighting the detailed explanations on the definitions, developer guide, API reference, and operations of Lambda.
To know more please visit https://www.whizlabs.com/blog/aws-lambda-documentation/
This document provides a tutorial on AWS Lambda. It begins by defining AWS Lambda as a computing service that runs code without servers. It then lists key features like custom logic integration, fault tolerance, RDS proxy support, provisioned concurrency, and Step Functions workflow support. The document outlines the steps to create, upload, and invoke an AWS Lambda function using the Eclipse toolkit, including creating a project, uploading the code to AWS, and invoking the function to display output. It concludes by recommending AWS Lambda for executing application/function codes and providing an informative guide.
Amazon has proved its might in the field of offering diverse cloud services and has excelled in almost all scenarios to date. Amazon EC2 came into play in 2006 and has gained immense popularity since then. But, along with that, AWS Lambda is also a popular service that came out in 2014 and is now walking side-to-side with EC2 in terms of popularity and adaptation.
To know the major differences between AWS Lambda and CE2 please visit https://www.whizlabs.com/blog/aws-lambda-vs-ec2/
AWS Lambda is a computing service that allows you to run the prepared codes without the necessity of managing or provisioning servers. Lambda is destined to run your code only when it is highly needed and further scales it automatically. AWS Lambda allows you to run the codes virtually for almost all types of applications and back-end services. Along with that, it performs all of the administration operations such as computing the resources, OS maintenance, server maintenance, automatic scaling, capacity provisioning, code monitoring, and others. The only thing you need to do is put up your code in a Lambda understandable language. AWS Lambda is chargeable, and it bills you for the compute time consumed by you and does not charge you anything while your code is stationary.
To read further please visit https://www.whizlabs.com/blog/what-is-aws-lambda/
Data storage has been considered a real problem within IT enterprises in the present era. But, with the introduction of AWS cloud, data storage problems seem to soon get eradicated completely. Thus, it is quite important for people to gain insight into the Amazon Elastic Block Storage and Balancer and its attributes before they can take concern upon implementing it.
To know more please visit https://www.whizlabs.com/blog/amazon-elastic-block-storage-and-balancer/
Amazon EC2 allows users to integrate virtual machine instances and configure scaling capacity. It provides templates called AMIs that users select to start instances, which can then be monitored and terminated as needed. Users determine instance locations and storage options, and are billed only for resources used like hours and data transfer. EC2 offers features like hibernating instances for later resuming, high I/O instances, custom CPU configurations, and flexible storage options to meet different workload needs. Its benefits include reduced booting time, scalable capacity, complete server control, flexible OS and storage choices, and built-in security.
Virtual Private Cloud is an enterprise-oriented virtual network that allows businesses to operate from their own data center. It is a service that enables the users to gain complete control over the virtual environment.
With AWS Virtual Private Cloud, you also get the potential of customizing your own VPC network. You can create diverse subnets based on public and private resources by implementing complete access control. Moreover, the security aspects are highly concerned by Amazon for its VPC. To know more please visit https://www.whizlabs.com/blog/aws-virtual-private-cloud-guide/
The Advantages of Using a Private Cloud Over a Virtual Private CloudWhizlabs
With the boom of virtual private Cloud, people have not forgotten the efficacy of a private cloud for serving specific purposes. The Private Cloud is a single cloud environment that is dedicated to run on individual infrastructure. It usually functions with off-site data centers or is carried out by managed private cloud service providers on the premises.
The reason why people still prefer private Cloud over the public and virtual Cloud is for its exclusivity and control. You do not have to share the hosted resources with anyone but keep it only to yourself. To know more please visit https://www.whizlabs.com/blog/the-advantages-of-using-a-private-cloud-over-a-virtual-private-cloud/
Virtual private cloud gives the users a private environment suitable for cloud computing that is contained within a public cloud. A virtual private cloud can be used for storing data, running codes, hosting websites, and everything else that you intend to do in any usual private cloud. As the public cloud computing environment is highly crowded, you will still get that private space within it to carry out your operations.
For more information please visit https://www.whizlabs.com/blog/virtual-private-cloud-a-guide/
Both Amazon Glacier and AWS S3 are storage solutions of Amazon that help you stay safe from data loss. Whenever you commence with your first AWS-hosted application for your business start-up, the first thing that comes to your mind is to preserve frequent and inactive data on priority.
Amazon S3 exists in the market for a long time, while Amazon Glacier has entered later with impeccable features and facilities. Both of them are rightful services that are meant to offer you an ideal backup solution at the time of crisis. But, people are curious to know the differences between the two. It is because if both are the same in terms of service offerings, why should people prefer one over the other.
To read more about the comparison between Amazon Glacier vs S3 please visit https://www.whizlabs.com/blog/amazon-glacier-vs-s3/
Amazon Glacier is considered as a cloud storage platform developed and launched by AWS with longer retrieval times. Under this, a developer is meant to use Amazon Glacier for the purpose of moving the less accessible data to archive storage for saving costs on storage.
The archiving solutions were available earlier at a high cost, and along with that, the companies had to determine the capacity requirement as well. This was hampering the entire functionality with several drawbacks such as under-utilized capacity and unwanted money expenditures. Therefore, Amazon Glacier took over this hassle and brought in a convenient and cheaper solution for data backup and archiving.
For more information please visit https://www.whizlabs.com/blog/what-is-amazon-glacier/
This document provides a summary of 50 common Azure interview questions and answers, organized into basic, general, and experienced categories. It begins by defining common Azure terms like Microsoft Azure, Azure diagnostics, cloud computing, PaaS, SaaS, and IaaS. It then covers questions about Azure roles, deployment models, services, scaling, and advantages of cloud computing. More advanced questions address Azure VM sizes, table storage, repositories, lookups, and SQL Azure database types. The document aims to help candidates prepare for Azure technical interviews.
50 must read hadoop interview questions & answers - whizlabsWhizlabs
At present, the Big Data Hadoop jobs are on the rise. So, here we present top 50 Hadoop Interview Questions and Answers to help you crack job interview..!!
Secrets To Winning At Office Politics How To Get Things Done And Increase You...Whizlabs
Learn PMP through Webinar recording on 'Secrets To Winning At Office Politics How To Get Things Done And Increase Your Influence At Work' led by Mr. James L. Haner, Founder & Owner, www.JamesLHaner.com
Concept of Economic Zology.pdfhhhhhhhhhhhhhhseeratehsan08
Excellent — let’s expand it further with additional headings, subpoints, and a bit more detailing under each section. Here’s a richer, detailed assignment version you could use:
---
## 📖 **Detailed Assignment on Sclerenchyma Tissue**
---
### 📝 **Introduction to Plant Tissues**
Plants possess different types of tissues for performing various physiological and structural functions. Broadly, plant tissues are categorized into:
- **Meristematic tissues** (actively dividing)
- **Permanent tissues** (non-dividing, mature)
Permanent tissues are further classified into:
1. **Simple permanent tissues** — made up of only one type of cell
2. **Complex permanent tissues** — made up of more than one type of cell
Among **simple permanent tissues**, there are:
- Parenchyma
- Collenchyma
- Sclerenchyma
This assignment focuses on **Sclerenchyma Tissue**.
---
### 📖 **Definition of Sclerenchyma**
**Sclerenchyma** is a type of **simple permanent plant tissue** consisting of dead, thick-walled, lignified cells that provide mechanical support and strength to the plant body, especially in parts that have stopped growing.
---
### 🔬 **Characteristics of Sclerenchyma Tissue**
- Made up of **dead cells** at maturity.
- Cells have **thick, secondary cell walls** impregnated with **lignin** (a complex organic polymer).
- **Cell lumen (central cavity)** is either very narrow or absent.
- No **intercellular spaces** between sclerenchyma cells.
- The walls often contain **simple or bordered pits**.
- Arranged as bundles, continuous layers, or isolated cells.
- Provides **maximum mechanical strength** among all plant tissues.
---
### 📝 **Structure of Sclerenchyma Cells**
- **Shape:** May be elongated, narrow, isodiametric, or irregular.
- **Wall:** Thick, lignified, with simple or bordered pits.
- **Lumen:** Very narrow or obliterated.
- **Living Status:** Dead at maturity due to absence of protoplasm.
- **Special Feature:** Impregnation with **lignin** makes the wall hard, waterproof, and rigid.
---
### 📚 **Types of Sclerenchyma Tissue**
Based on shape, size, and occurrence, sclerenchyma is classified into:
#### **1️⃣ Fibres**
- **Structure:** Long, narrow, tapering at both ends.
- **Size:** Can be several millimeters in length.
- **Cell Wall:** Thick and lignified.
- **Lumen:** Narrow.
- **Occurrence:** Found in stems, leaves, fruits, and vascular bundles.
- **Examples:** Jute, flax, hemp fibres.
- **Function:** Provide **tensile strength and flexibility**.
#### **2️⃣ Sclereids (Stone Cells)**
- **Structure:** Short, isodiametric or irregularly shaped.
- **Cell Wall:** Very thick, often layered.
- **Lumen:** Small or obliterated.
- **Occurrence:** Found in seed coats, nutshells, pericarp of fruits, and leaves.
- **Examples:** Gritty texture in guava, pear; hard covering in nuts.
- **Function:** Provide **hardness and protection**.
---
### 📌 **Functions of Sclerenchyma Tissue**
- Provides **mechanical strength and rigidity** to plant organs.
- Enables
When Is the Best Time to Use Job Finding Apps?SnapJob
SnapJob is a powerful job-finding app that connects job seekers with tailored opportunities instantly. With smart filters, real-time alerts, and an easy-to-use interface, SnapJob streamlines your search and helps you land your dream job faster than ever.
EasyWorship Pro 2025 Crack with numerous key free Downloadhaleemasadia367999
EasyWorship is a comprehensive church presentation software 2025 designed to simplify the creation and delivery of worship services. It enables churches to display song lyrics, scriptures, sermon slides, and videos seamlessly, enhancing the worship experience for congregations The software provides a resource library to organize and access songs, scriptures, videos, and announcements, streamlining the presentation process.
➡️ 🌍📱👉COPY & PASTE LINK👉👉👉https://freeprocrack.org/download-setup/
1617 SEEART EHSAN HUMAN GENffETICS.pptxseeratehsan08
Excellent — let’s expand it further with additional headings, subpoints, and a bit more detailing under each section. Here’s a richer, detailed assignment version you could use:
---
## 📖 **Detailed Assignment on Sclerenchyma Tissue**
---
### 📝 **Introduction to Plant Tissues**
Plants possess different types of tissues for performing various physiological and structural functions. Broadly, plant tissues are categorized into:
- **Meristematic tissues** (actively dividing)
- **Permanent tissues** (non-dividing, mature)
Permanent tissues are further classified into:
1. **Simple permanent tissues** — made up of only one type of cell
2. **Complex permanent tissues** — made up of more than one type of cell
Among **simple permanent tissues**, there are:
- Parenchyma
- Collenchyma
- Sclerenchyma
This assignment focuses on **Sclerenchyma Tissue**.
---
### 📖 **Definition of Sclerenchyma**
**Sclerenchyma** is a type of **simple permanent plant tissue** consisting of dead, thick-walled, lignified cells that provide mechanical support and strength to the plant body, especially in parts that have stopped growing.
---
### 🔬 **Characteristics of Sclerenchyma Tissue**
- Made up of **dead cells** at maturity.
- Cells have **thick, secondary cell walls** impregnated with **lignin** (a complex organic polymer).
- **Cell lumen (central cavity)** is either very narrow or absent.
- No **intercellular spaces** between sclerenchyma cells.
- The walls often contain **simple or bordered pits**.
- Arranged as bundles, continuous layers, or isolated cells.
- Provides **maximum mechanical strength** among all plant tissues.
---
### 📝 **Structure of Sclerenchyma Cells**
- **Shape:** May be elongated, narrow, isodiametric, or irregular.
- **Wall:** Thick, lignified, with simple or bordered pits.
- **Lumen:** Very narrow or obliterated.
- **Living Status:** Dead at maturity due to absence of protoplasm.
- **Special Feature:** Impregnation with **lignin** makes the wall hard, waterproof, and rigid.
---
### 📚 **Types of Sclerenchyma Tissue**
Based on shape, size, and occurrence, sclerenchyma is classified into:
#### **1️⃣ Fibres**
- **Structure:** Long, narrow, tapering at both ends.
- **Size:** Can be several millimeters in length.
- **Cell Wall:** Thick and lignified.
- **Lumen:** Narrow.
- **Occurrence:** Found in stems, leaves, fruits, and vascular bundles.
- **Examples:** Jute, flax, hemp fibres.
- **Function:** Provide **tensile strength and flexibility**.
#### **2️⃣ Sclereids (Stone Cells)**
- **Structure:** Short, isodiametric or irregularly shaped.
- **Cell Wall:** Very thick, often layered.
- **Lumen:** Small or obliterated.
- **Occurrence:** Found in seed coats, nutshells, pericarp of fruits, and leaves.
- **Examples:** Gritty texture in guava, pear; hard covering in nuts.
- **Function:** Provide **hardness and protection**.
---
### 📌 **Functions of Sclerenchyma Tissue**
- Provides **mechanical strength and rigidity** to plant organs.
- Enables
Latest Questions & Answers | Prepare for H3C GB0-961 CertificationNWEXAM
Start here---https://shorturl.at/ojpjM---Get complete detail on GB0-961 exam guide to crack H3C Certified Specialist for Intelligent Management Center (H3CS-iMC). You can collect all information on GB0-961 tutorial, practice test, books, study material, exam questions, and syllabus. Firm your knowledge on H3C Certified Specialist for Intelligent Management Center (H3CS-iMC) and get ready to crack GB0-961 certification. Explore all information on GB0-961 exam with number of questions, passing percentage and time duration to complete test.
UPSC+BAProgramme Syllabus for students who want to pursue UPSC coaching from ...Tushar kumar
UPSC+BAProgramme Syllabus for students who want to pursue UPSC coaching from time of graduation. This will give early movers advantage and students get enough time for their preparation. best teaxchers and mentors like Prateek Tripathi sir,Dr Huma Hassan guide students for such course.
UPSC+BAProgramme Syllabus for students who want to pursue UPSC coaching from ...Tushar kumar
Top 100 Java Interview Questions with Detailed Answers
1. Top 100 Java Interview Questions
With Detailed Answers
Are you a Java professional preparing for an interview? If yes, you’ve reached
the right page. Yes! We’ve got you covered with Top 100 Java interview
questions with detailed answers.
As a Java professional, it is required to be familiar with various Java
technologies while going for an interview. In this Java interview
questions blog, we have compiled a definitive set of most commonly
asked Java interview questions and answers for freshers as well as
experienced professionals to help them crack the Java interview.
Millions of developers and a huge number of devices
worldwide are using Java. Java is everywhere!!
We have divided this list of Java interview questions into 9 sections to
make it easier for you to easily prepare each section. So, let’s start with
the first section Core Java Interview Questions and Answers.
WWW.WHIZLABS.COM !1
2. Core Java Interview Questions
In this section, we’ve not only covered the core Java interview questions
for freshers but you will also find the core Java interview questions for
experienced professionals. If you are an aspirant freshers, determined
enough to become a Java professional or want to bring your Java
development career one level up, these Core Java interview questions
will help you reach the goal. If you have come across any other Java
interview question, please post it in the comment section.
1. Can you explain class and object with a Java example?
Answer – Class and Object both are the basis of Object Oriented
Programming, and the concept of class and object revolves around the
real-world entities.
Class – A class in Java can be defined as a template or program construct
that is used to create objects, and also its methods and data types.
The declaration of a class may include various components such as class
name, body, modifiers, interface (not mandatory), and superclass (not
mandatory).
Let’s consider an example of class i.e. Student
Class Student
{
WWW.WHIZLABS.COM !2
3. // instance variables declaration
// methods definition
}
Object – An object is known as the basic unit of Object Oriented
programming. It is a program construct that has state, behavior, and
identity.
Many objects are created in a Java program that interacts by invoking
methods.
Let’s consider the object of the Student class, that will be a specific
student.
Student amaira = new Student ( );
It means one of the students of Student class is referred by ‘amaira’
2. What are the basic concepts/principles of OOPS?
Answer – The Object-Oriented Programming System is based on the four
basic principles, these are –
Abstraction – The abstraction is the concept of representing essential
features by hiding internal details or features.
WWW.WHIZLABS.COM !3
4. Inheritance – The inheritance is the concept through which the objects
of one class are able to acquire the characteristics of the objects of any
other class.
Polymorphism – The polymorphism is the object-oriented programming
concept that enables the creation of a function, a variable or an object
with one name but in multiple forms.
Encapsulation – An another OOPS concept that is used to hide the
behaviour and properties of an object. This concept allows only
appropriate outside access. Also, it avoids other objects to access the
properties and methods of encapsulated object directly.
3. Explain the basic features of Java.
Answer – Java was created with the aim of making a simple, portable,
and secure programming languages. Apart from these basic features, Java
has many other awesome features that make it so popular. These are –
WWW.WHIZLABS.COM !4
5. • Java is a simple programming language
• Java is distributed
• Java is faster i.e. high-performance
• Java is dynamic in nature
• Java is multithreaded
• Java is robust in nature
• Java is highly portable language
• Java is independent of platform
• Java provides high-level security
• Java is architecture neutral
• Java is an object-oriented programming language
4. How is Java an object-oriented language?
Answer – Being an object-oriented programming language is an
important feature of Java. Let’s understand what makes it object-oriented.
• Java follows Object Oriented programming model
• Java is focused on the modular approach
• Java follows the concept of abstraction
• Java strictly follows object-oriented principle encapsulation
• Java is based on the inheritance i.e. object-oriented concept
• Java follows the object-oriented principle of polymorphism
5. How will you compile a Java program?
Answer – In order to compile a Java program, follow the steps mentioned
below –
WWW.WHIZLABS.COM !5
6. 1. Save the source code file with .java extension. For example –
student.java
2. Javac compiler will then create a bytecode version of the source file
i.e. Student.class
3. The bytecode is the executable code and thus executed by the Java
Virtual Machine (JVM), also known as Java runtime systems.
6. What does “public static void main (String args [ ] )“ signify?
Explain.
Answer –
• “public” is the access specifier
• “static” is the access modifier that allows main ( ) method to be
invoked without creating any instance of the class
• “void” is the return type that specifies that the main ( ) method
won’t return any value
• main ( ) is the pre-defined method that is called in the beginning of
a java program
• “String args [ ]” are the arguments of the type String, when a Java
program is run, the Java application accepts it.
7. What does “System.out.println ( )” specify?
Answer –
“System” is the pre-defined class in Java that gives access to the system
“out” is the output stream
WWW.WHIZLABS.COM !6
7. “println” is the method that is used to print line on the console i.e.
println is the console output statement
8. What do you know about JVM?
Answer – The full form of JVM is the Java Virtual Machine. Some
important features of Java Virtual Machine are –
• JVM is platform dependent
• JVM is the runtime system of Java
• JVM acts as an interpreter for the bytecode
• JVM is responsible to maintain the security of the system
• JVM is the what actually provides the environment for execution
9. Define garbage collection.
Answer – In Java, garbage collection is used to free up the memory. It is
done by clearing/deleting those objects which are no more required by
any program. Two steps are involved in the process of garbage collection
–
Step 1: Garbage Object Collection
This step involves the grouping and collection of all the objects that are
not referenced by any program. The garbage collector uses various
methods for the collection of garbage objects such as system.gc( ) or
runtime.gc( )
Step 2: Run Finalize Method
WWW.WHIZLABS.COM !7
8. After the collection of objects, the next step is to free the memory space
by deleting the objects that has been gathered by the garbage collector.
Then, Finalize method is executed in order to delete all the objects that
are dynamically created.
10. Define polymorphism.
Answer – The meaning of word polymorphism is – one name and many
forms. Polymorphism refers to the characteristic of methods to act
differently on the basis of the calling object. Followings are the key
features of polymorphism –
• It allows the use of one interface to implement various methods
• It supports method overloading i.e. allows the use of multiple
methods with same name but different arguments.
• It supports method overriding I.e. allows the use of multiple
methods with same name, same argument, and return type.
11. What do you know about constructor?
Answer – A constructor can be defined as a block of code very similar to
the method that is called on the creation of an instant of the object. The
features of the constructor are as follows –
• The name of the constructor is same as that of the name of the class.
• It doesn’t have any return type.
• It is not considered as the class member like other methods.
• It is invoked automatically when a new instance of an object is
created.
• It can not be inherited like other methods of the class.
WWW.WHIZLABS.COM !8
9. • It is not compulsory to create a constructor for the class.
Advanced Java Interview Questions
In the second section, we cover the advanced Java interview questions
and answers for freshers as well as experienced professionals. If you are
looking for some advanced Java interview questions to crack the Java
interview and get a better job, these advanced Java interview questions
for experienced are only for you. If you have any other Java interview
questions for freshers or experienced professionals, please post in the
comment section.
12. What are the different Access Specifiers in Java?
Answer – Access Specifiers are used to setting the access level of the
classes and the methods, fields, and constructors in the classes. There are
four different types of Access Specifiers in Java –
• Public – The classes, fields, and methods defined by public access
specifier, are accessible by every class.
• Private – The fields and methods defined by private access specifier
are accessible within the same class to which those fields and
methods belong. The private fields and methods can’t even be
inherited by any subclasses.
• Protected – The fields and methods defined by protected access
specifier are accessible only in the class to which those fields and
methods belong.
WWW.WHIZLABS.COM !9
10. • Default – Default means no specifier. When the methods, fields, and
classes are not defined by any access specifier, then those methods,
fields, and classes are accessible in the package to which those
methods, fields, and classes belong.
13.. What are the different method signatures in Java?
Answer – A method inside a class is the sequence of statement to
perform a specific task.
Method Signatures: A number of parameters such as method name,
return type, access specifiers etc. constitute the method signature. The
various elements of the method signature are –
Method name – Method name is the mandatory signature, such as
display ( )
Return type – Return type of the method is also the mandatory method
signature, it can be void, int, float, string etc.
Access Modifier – It is the method signature that is not compulsory to be
defined. It can be synchronized, static, etc.
Access Specifier – Not mandatory method signature; access specifier can
be private, public, protected etc.
WWW.WHIZLABS.COM !10
11. Parameters – A method may either have or not parameters; these are
given in parenthesis such as (String name, int number);
A few examples of methods with the signatures are –
public static void getFinalName (String Name) { }
Void displaySum ( ) { }
public synchronized int getSalary (double grossSalary) {
}
14. What is a thread? What do you know about its lifecycle?
Answer – A thread is an execution in the program which follows the
single flow of control. The life cycle of thread comprises of the five
states, that are being mentioned below –
Newborn state – When an instance of the thread is created, the thread is
considered to be in this newborn state. In this state, the thread is not
considered alive, and the state exists before the start ( ) method is
invoked.
Runnable state – The life of the thread starts from this state i.e. runnable
state. When the start ( ) function is invoked, the thread enters in the
runnable state.
Running state – When the thread enters the runnable state, it is ready to
run and start the program execution. When the thread is actually in the
execution phase, it is said to be in the running state.
WWW.WHIZLABS.COM !11
12. Blocked state – During the running state, the thread may have to wait for
the resources that are being used by any another thread. During the
waiting phase, the thread is known to be in the blocked state.
Dead state – When the execution of the program is
done and the run ( ) method is completed, the thread is said to be in the
dead state. After this state, a thread cannot be in execute or run again.
15. What are the Applets?
Answer – Applets are the small Java programs that can be sent from one
computer to the other computer over the network with the use of Applet
Viewer that supports Java.
Applets have following properties –
WWW.WHIZLABS.COM !12
13. • Being a Java program, an applet can be run in a web browser
• It has the set of whole Java API
• Applets are known to be the fully functional Java application
• Applets offer a high-level security, called sandbox security
• Applets follow the security ruled of the web browser
16. Mention the situations when you will prefer to use interfaces and
when abstract classes.
Answer – It depends when a Java programmer will use interfaces and
when abstract class. Let’s discuss both one by one –
Abstract Classes are used –
• When you need to make multiple implementations of the same kind
with common behaviour
• In order to create inheritance hierarchies (already planned)
• When you have to leave the implementation task on the inheriting
subclass by enabling the generalised form of abstraction
Interface is used –
• When you need multiple classes to use some methods that are not to
be included in the class
• When multiple implementations share the signatures of method or
program design is changed frequently
17. How are the source code files named in Java?
WWW.WHIZLABS.COM !13
14. Answer – The name of the Java source code file is same as that of the
public class or interface, defined by programmer during writing the
program code. It is restricted that source code won’t contain more than
one public class or interface. While naming a Java source code file, there
may be occurrence of two different cases –
Case 1: When there is no public class or interface in the source code file
–
Although it is mandatory that source code file will contain only one
public class or interface but it may not contain any public class or
interface. In this case, the java source code file will be named something
else except its interfaces and classes.
Case 2: When there is one public class or interface in the source code file
–
It is the case when one public class or inheritance occur in the source
code file. In this case, the name of the java source code file will be same
as that of the public class or interface that has been defined in the
program code.
18. What do you mean by the nested class?
Answer – In general, the meaning of nested means one in another. In
Java, a nested class means a class within another class i.e. the class that
is declared inside an another class is the nested class.
WWW.WHIZLABS.COM !14
15. Some times, the nested class is also known as the inner class. The Syntax
is –
class Parent_class
{
//code
class Nested_class
{
//code
}
}
Advantages of nested class in Java
• Permitted to access all the methods and data members (including
private) of the outer class
• As it groups interfaces and classes in one place, thus develops
easily maintainable and readable code
• Less code is required to be written
WWW.WHIZLABS.COM !15
16. 19. Does Java support networking?
Answer – Yes, Java supports networking. There are two types of classes in
Java to support networking i.e. low-level and high-level. These classes
control the network applications programming. As Java is platform
independent in nature, Java networking is also platform independent.
The classes to support Java networking are –
• Low-level classes – These classes support socket programming like
DataramSocket, Socket, and ServerSocket classes.
• High-level classes – These classes provide support for URLEncoder,
web programming URL, and URL connection.
20. Is there any alternative to inheritance? Explain.
Answer – Yes, there is an alternative to inheritance in Java; Delegation.
Followings are the important points about delegation –
• Delegation specifies that there exists an instance of any class that
works as the instance variable and used to send messages to that
instance of the class.
• Delegation is comparatively safer than that of the inheritance as
the programmer doesn’t need to think about the forwarded
message. As the instance belongs to the existing known class and
doesn’t make you accept all the methods of superclass, only the
selected and required methods can be provided.
WWW.WHIZLABS.COM !16
17. • Due to delegation, the programmer have to write more code. Also, it
is harder to reuse the delegation unlike inheritance as it is not a
subclass.
21. What is the difference between JDK, JVM, and JRE?
Answer – The difference between JDK, JVM, and JRE is as follows:
JDK – JDK stands for Java Development Kit. JDK is the most commonly
used software development environment for Java programmers. It is
meant for the development of Java applications and applets. It consists
of Java Runtime Environment, a compiler (javac), an interpreter (Java), an
archiver (jar), a generator for documentation (Javadoc), and some other
tools that are required in the development of Java applications.
JVM – JVM is an acronym for JavaVirtual Machine. It acts as an interpreter
for the byte code. It is the real runtime system of Java and provides an
environment for the execution of Java programs and applications. Most
important, Java Virtual Machine is independent of the platform.
JRE – JRE is the Java Runtime Environment, also known as Java RTE. It is
the Java Virtual Machine implementation that is responsible for the
execution of Java applications. It provides everything that is required for
the execution of a Java application. It comprises of the Java Virtual
Machine, supporting files, and core classes.
22. What is the difference between WAR and JAR files?
WWW.WHIZLABS.COM !17
18. Answer –The difference between WAR and JAR files is being described in
the following table –
23. What exactly happens when an object is created in Java?
Answer – When an object is created in Java, a number of things happen
in a specific sequence to ensure whether the object has been created
properly, these are –
1. Memory Allocation – The memory is allocated for the storage of all
the instance variables and the other data of object and its
superclasses that are related to implementation.
2. Initialization – After memory allocation, the objects are declared
and initialized with their default values.
3. Constructor – Next, the constructors call other constructors for its
superclasses. java.lang.Object is the base class for all the objects in
Java, so this process is repeated continuously until the constructor
for java.lang.Object is called.
WAR Files JAR Files
1. The term WAR files stand for
the Web Archive Files.
1. The term JAR files stand for the
Java Archive Files.
2. WAR files are responsible for
the storage of Java classes, XML,
and JavaServer pages.
2. Java files allow the
aggregation and storage of
multiple Java files into a single
file.
3. WAR files are mainly used for
the purpose of web applications.
3. JAR files are mainly used to
handle Java classes in a library.
WWW.WHIZLABS.COM !18
19. 4. Execution – In this step, the initialization of all the instance
variable takes place and the initialisation blocks are executed. After
that the execution of the body of the constructor takes place.
JDBC Java Interview Questions
In the third section, here we cover the JDBC Java interview questions and
answers. Go through these basic and advanced JDBC Java interview
questions and broaden your knowledge to crack the interview. If you
have any other JDBC Java interview questions, please post in the
comment section.
24. What do you know about JDBC?
JDBC is a Java API that is responsible for the connection and execution of
Java query with the database. JDBC API uses JDBC drivers to create a
connection between database and the query. JDBC API can be used to
access data from any relational database.
25. What are the steps to connect a Java application with the database
using JDBC?
Answer – Followings are the steps that will connect a Java application
with the database using JDBC:
Step 1: Registration of the driver class using forName( ) method of the
Class class.
WWW.WHIZLABS.COM !19
20. Step 2: Creation of connection object using getConnection( ) method of
the DriverManager class.
Step 3: Creation of statement object using createStatement( ) method. Of
the connection interface.
Step 4: Execution of the query using executeQuery( ) method of the
Statement interface.
Step 5: Closure of the connection object using close( ) method of the
Connection interface.
26. Name different types of JDBC statements in Java.
Answer – Following are the 3 different types of JDBC statements in Java:
1. Statement
2. CallableStatement
3. PreparedStatement
27. How will you store an image in database?
Answer – In Java, the images can be stored in a database with
the setBinaryStream( ) method of the Prepared Statement interface. This
method will set the Binary information into the parameterIndex.
The syntax is –
Public void setBinaryStream(Int paramIndex,InputStream stream)
WWW.WHIZLABS.COM !20
21. Throws SQLException
28. How are the stored functions and procedures executed in Java?
Answer – In Java, the stored functions and procedures are executed with
the help of CallableStatement interface.
29. Name the various components of JDBC API.
There are various components of JDBC API are classes and interfaces that
are stored in java.sql package, these are –
Classes – Blob, DriveManager, Types, Clob, SQLException etc.
Interfaces – Statement, Connection, ResultSet, PreparedStatement,
DatabaseMetaData, ResultSetMetaData, CallableStatement etc.
30. What is the batch processing technique in JDBC?
Answer – In Java, the batch processing technique is used to perform the
execution of multiple queries at the same time. During batch processing,
the grouping of related SQL statements is done into a batch and then
performs their execution instead of performing the execution of a single
query. In this way, the batch processing results in faster execution of
queries and improved performance.
31. What do you know about Connection interface in JDBC API?
Answer – The Connection interface is used for the maintenance of a
session with the database. It can also be used for the management of
transactions. It contains various factory methods that returns the
WWW.WHIZLABS.COM !21
22. instance of CallableStatement, Statement, PreparedStatement, and
DatabaseMetaData.
32. Differentiate statements execute, executeQuery, and
executeUpdate.
Answer – The difference between execute, executeQuery, and
executeUpdate is as follows –
execute (String query) – The execute statement is used to perform the
execution of SQL query. When the result is an ResultSet, it returns TRUE,
e.g. returns TRUE value for Update or Insert queries.
getResultSet( ) method is used to get the ResultSet and getUpdateCount(
) is method is used to get the value of update count.
executeQuery(String query) – The executeQuery statement is used for
the execution of Select queries and to return the ResultSet. The value of
ResultSet is never set to null even when no matching record is found for
the query.
executeQuery method should be used for the execution of Select queries
as it cannot be used for insert and update queries. It throws
java.sql.SQLException if someone executes update/insert query with the
message that executeQuery method cannot be used for update/insert.
executeUpdate (String query) – The execute update statement is used for
the execution of DML (i.e. Insert, Update, and Delete) statements and also
for DDL statements those don’t return any value.
WWW.WHIZLABS.COM !22
23. For DML statements the return value is int and equals to the DML
statements row count. While in case of DDL statements, the return value
is 0.
So, the execute( ) method is used only if you don’t know the type of query
statement else the use of executeQuery( ) and executeUpdate( ) methods
is preferred.
33. Name the interface that performs transaction management in JDBC.
Answer – The Connection interface performs the transaction
management in JDBC. It provides various methods such as rollback( ),
commit( ) etc. that helps in transaction management in JDBC.
String Handling Java Interview
Questions
The fourth section covers the String handling Java interview questions
and answers. Preparing through these String Java interview questions
will be highly helpful to crack the Java interview. If you have any other
String-based Java interview questions, please post in the comment
section, we’ll cover them up.
34. Why are the string objects immutable in Java?
Answer – In general, the meaning of term immutable is unchangeable
i.e. that cannot be changed.
WWW.WHIZLABS.COM !23
24. String objects are immutable in Java which means once the string
objects are created, it is not possible to change its value.
String objects are immutable as Java is based on the concept of string
literal. To understand this, consider that 5 references are there, all of
which refers to the one object called “naira”. In this case, if the value of
the object is changed by one reference variable, it will also affect the
value of the other reference variables. This is the reason why string
objects are immutable in Java.
35. What are the different ways to create String objects in Java?
Answer – There are two ways to create String objects in Java:
• By String Literal
String object using String literal is created by using double quotes. For
example –
String s=“hello”;
Every time, when you create a string literal, JVM checks string constant
pool to find if the string already exists. If the string already exists, it will
return a reference to the pooled instance. If the string is not already
there in the pool, JVM creates the new string and store it in the pool.
Now consider,
String s1=“hey”;
WWW.WHIZLABS.COM !24
25. String s2=“hey”;
Here, the second statement will not create the new instance as the first
statement has already created that.
• By New Keyword
This is an another method to create String objects in Java using new
keyword. For example –
String s=new String(“Niharika”);
This statement will create two objects and one reference variable.
In this case, JVM creates a new string object in a heap memory and the
literal “Niharika” will be stored in the constant pool of the string. The
variable s refers to the String object in the heap.
36. Differentiate StringBuilder and StringBuffer in Java.
Answer – The basic difference between StringBuilder and StringBuffer is
given as –
StringBuffer – It is a user mutable string i.e. its value can be changed any
time after it has been created. The objects that are created using
StringBuffer, are stored in the heap and StringBuffer is thread safe.
StringBuilder – It is also a user mutable string i.e. its value can be
changed any time after it has been created. StringBuilder also stores the
WWW.WHIZLABS.COM !25
26. objects in heap like StringBuffer but the main difference is that
StringBuilder is not thread safe.
37. How will you create an immutable class in Java?
Answer – There are a number of immutable classes in Java such as
Boolean, Integer, Float, Long, Double, Short, Byte, String etc. To sum up,
String class and all the wrapper classes are immutable. An immutable
Index StringBuffer StringBuilder
Modifiable
Yes, it can be modified or
changed i.e. mutable
No, it can’t be
modified or changed
i.e. immutable
Storage
Area
Objects created through
StringBuffer are stored in heap.
The objects created
through StringBuilder
are stored in heap.
Thread
Safe
Yes, it is thread safe.
No, it is not thread
safe.
Synchroniz
ation
All the methods in StringBuffer
are synchronized
Methods are not
synchronized in
StringBuilder
Method
Access
A method can access only one
thread at a time
A method can access
multiple threads
simultaneously at a
time
Performan
ce
StringBuffer is slower than
StringBuilder even while
calling the same methods of a
class
StringBuilder is faster
when it comes to
calling the same
methods of a class
Conversion
StringBuffer to String
conversion can be done by
using toString ( ) method, + “” or
String.valueOf ( ) method
StringBuilder to
String conversion can
be done by using
toString ( ) method.
WWW.WHIZLABS.COM !26
27. class can also be created by creating a final class containing final data
members.
A class is said to be final when
• The class itself is final i.e. it is not possible to create its subclasses.
• It has a final instance variable i.e. it is not possible to change its
value after the creation of an object.
• There are no setter methods i.e. there will not be any option to
change the value of instance variable.
For example –
public final class Student
{
Final String idNumber;
public Employee(String idNumber)
{
this.idNumber = idNumber;
}
public String getidNumber( )
WWW.WHIZLABS.COM !27
28. {
return idNumber;
}
}
This is a final class with name Student that contains one parameterised
constructor, one final data member, and a getter method.
38. Why does the Java use the concept of string literal?
Answer – Java uses the concept of string literal as it makes Java more
memory efficient. It is because the concept of string literal doesn’t create
a new String object if that is already existing in the String constant pool.
It avoids the redundant storage and thus saves memory.
39. How many String objects the following code will create? Explain.
• String s1 = “Hello”;
• String s2 = “Hello”;
• String s3 = “Hello”;
• String s4 = “Hello”;
• String s5 = “Hello”;
Answer – The given code will create only one String object.
Explanation – Only the first statement will create the String object
“Hello”. For the next statements, as the string is already there in the
WWW.WHIZLABS.COM !28
29. constant pool, JVM will not create any instance instead will return a
reference to the pooled instance.
40. What is the main difference between string and stringbuffer
object?
Answer – The main difference between string and stringbuffer object
can be explained in terms of the mutability.
String object is immutable while StringBuffer object is mutable.
41. What is the use of toString() method in Java?
Answer – The toString() method returns the object representation.
Whenever an object is printed, Java complier will invoke the toString()
method for that object. This overriding of toString() method will return
the desired output on the basis of your implementation.
Exception Handling Java Interview
Questions
The fifth section covers the Exception handling Java interview questions
and answers. Preparing through these Exception Handling Java interview
questions will be highly helpful to crack the Java interview. If you have
any other Exception-based Java interview questions, please post in the
comment section, we’ll cover them up.
42. What is exception handling?
WWW.WHIZLABS.COM !29
30. Answer – Exception handling can be defined as the process of handling
runtime errors such as IO, Remote, ClassNotFound, Remote etc.
The exceptions may effect the normal execution of application, that’s
why the exception handling is used.
Importance of exception handling
Exception handling is very important while creating Java programs and
applications. It is important as it helps to maintain the normal flow of
the application avoiding any disruption (i.e. runtime error).
43. What is an exception? How is it different from error?
Answer –
In general terms, exception is something that creates abnormal
condition.
In Java, the runtime errors are known as exceptions. These are the events
or conditions, thrown at the runtime and affects the normal flow of a
program.
Difference between Exception and Error –
The exceptions are the recoverable conditions that thrown at runtime
while errors are the irrecoverable conditions that are also thrown at
runtime.
WWW.WHIZLABS.COM !30
31. The example of exception is FilenotFoundException that will be thrown
when the particular file is not found or that does not exist.
The example of error is OutofMemory.
44. Name the keywords that are used to handle exceptions in Java.
Answer – The Java exceptions are handled by the use of five keywords:
throw
throws
finally
try
catch
45. Differentiate checked exception and unchecked exception.
Answer – The differences between checked exception and unchecked
exception are as follows:
Checked Exception Unchecked Exception
The checked exceptions are those
which are checked at the compile
time.
The unchecked exceptions are
those which are not checked
at the compile time.
WWW.WHIZLABS.COM !31
32. 46. Explain the hierarchy of exception in Java.
Answer – The hierarchy of exception in Java can be explained by the
following diagram –
The parent class of all the Exception and Error classes is the Throwable
class. The exceptions are classified into two types – Checked Exceptions
and Unchecked Exceptions. Also, the errors are of two types – Assertion
Errors and Virtual Machine Errors.
47. Explain some of the methods of Exception class in Java.
Answer – The specific methods used to handle exception handling are
not present in the Exception class andlasses but all the exception
These exceptions are thrown by the
classes that extend Throwable class
except RuntimeException.
These exceptions are thrown
by the classes that extend
RuntimeException.
The examples are SQLException,
IOException etc.
The examples are
NullPointerException,
Arithmetic Exception etc.
WWW.WHIZLABS.COM !32
33. handler methods are defined in the parent class i.e. Throwable. Some of
the methods that are used for exception handling are:
String toString( ) – The information about Throwable is returned by this
method in String format. The output String of this method contains a
localized message along with the name of the Throwable class.
String getMessage( ) – The result of this method is the message String
of Throwable.
Synchronized Throwable getCause( )- The output of this method specifies
the cause null id or the exception.
String getLocalizedMessage( ) – This method is overriden by the
subclasses to provide specific localized message to the calling program.
In Throwable class, this method is implemented just by using
getMessage( ) method which returns the exception message.
void printStackTrace( ) – This method is used to print the information
about stack trace. This is an overloaded method. In order to write stack
trace information to the stream or file, we can pass PrintWriter or
PrintStream as argument of this method.
48. Write some statements the will create custom Exceptions.
Answer – The custom exceptions can be created by extending the
Exception class or its subclasses.
Example 1:
WWW.WHIZLABS.COM !33
34. class NewException extends ArithmeticException{
}
//this will create Unchecked Exception
Example 2:
class NewException extends Exception
{
}
//this will create Checked Exception
Example 3:
Class NewException extends IOException
{
}
//this will create Checked Exception
49. Is it possible to use try block without catch block?
WWW.WHIZLABS.COM !34
35. Answer – Yes, it is possible to use try block without catch block. It is not
always required that the try block should be followed by a catch block.
Try block can also be followed by a finally block. And the exceptions that
are to be thrown should be declared in the throws clause of the method.
50. In which case the finally block will not be executed?
Answer – In case of the program exit, the finally block will not be
executed. So, when the program exits either by causing a serious error
that may cause the abortion of the process or by calling System.exit()
method, it will stop the finally block from execution.
51. Differentiate throw and throws.
Answer – The main differences between throw and throws are as follows
–
Throw Throws
1. Throw is used to trigger the
expectation.
1. Throws is used for the
declaration of an expectation.
2. Throw is used inside the
method body
2. Throws is used in the method
signature.
3. Throw is followed by the
instance of exception class,
such as
Throw new ArithmeticException
(“Arithmetic Exception”);
3. Throws is followed by the name
of exception class, such as
Throws ArithmeticException;
WWW.WHIZLABS.COM !35
36. 52. How will you differentiate final, finalize, and finally?
Answer – The difference between final, finalize, and finally is as follows –
Final – In Java, Final is a keyword that is used to define constants.
Once a class is declared as final, it can not be divided into subclasses.
Once a field is marked as final, its value becomes constant that cannot be
reset.
When a method is declared as final, subclasses cannot override that
method.
Finalize ( ) – Finalize method in Java is associated with the garbage
collection.
The finalize method is automatically invoked before the garbage value
collection.
Finally – Finally block in Java is used with the try and catch blocks
(except when try block uses System.exit(0) call)
The finally block is meant for the unexpected error. It executes the last
clause mentioned in the try catch block.
4. Using throw, one exception
can be handled at a time.
4. Using throws, multiple
exceptions can be declared at the
same time.
WWW.WHIZLABS.COM !36
37. The finally block contains a set of statements thats execution does not
depend on the exception caught by the previous catch block.
Servlet Java Interview Questions
Here in sixth section, we cover the list of Servlet Java interview
questions for the freshers and as well as professionals. If there is any
Servlet-based Java interview question, you want to find the answer, post
it in the comment section and our expert team will respond with the
detailed answer.
53. What do you know about Servlet?
Answer – Servlet in Java is server side technology that provides support
for the data persistence and dynamic response and thus enhance the
web servers capabilities. Some important points about Java Servlets are
–
• There are two types of packages i.e. javax.servlet and
java.servlet.http that provides classes and interfaces to write own
servlets.
• javax.servlet.Servlet interface is responsible to define the methods
for servlet lifecycle, so it is mandatory for all the servlets to
implement java.servlet.Servlet interface.
• Java Servlet API provides GenericServlet class that can be extended
during the implementation of any generic service.
• The HttpServlet class contains methods to handle HTTP specific
services i.e. doPost( ) and doGet( ).
WWW.WHIZLABS.COM !37
38. • As the http protocols are mainly used to access the web
applications, HttpServlet class is extended.
54. What are the different stages in a servlet lifecycle?
Answer – The lifecycle of a servlet comprises of the 5 stages:
Loading – The servlet class is loaded
Instant Creation – The servlet instance is created
Initialization – Init method is invoked and the servlet becomes ready
Service Request – Service method is invoked to perform any task
Destruction – invocation of destroy method and the destruction of
servlet
WWW.WHIZLABS.COM !38
39. 55. Explain the working of cookies in Servlets.
Answer – Cookies are the text that are sent to the client by server, and is
saved at client side. Servlet APIs contain javax.servlet.http.Cookie class
which implements Cloneable and Serializable interfaces an thus
provides cookies support.
HttpServletRequest getCookies( ) method is used to get the array of
cookies from the request.
HttpServletResponse addCookie (Cookie c) method is used to attach the
cookie in response header.
As there is no need to add cookie to the request, no method is there to
add or set cookie to the request. Similarly, there is no getter method for
the cookies in servlet.
WWW.WHIZLABS.COM !39
40. 56. What are the various methods to manage session in Servlets?
Answer – Session is a state of conversation between the server and the
client. It may consist of a number of requests and responses between the
server and the client. Session is maintained through session id (that is
the unique info about the session). The session id is passed between
client and server during every request and response.
There are different methods for the management of sessions in servlets
–
Cookies
URL Rewriting
HTML Hidden Field
User Authentication
Session Management API
57. Differentiate between Get and Post methods.
Answer – The difference between Get and Post methods is as follows –
Get Method Post Method
Get method is used to request
data from a particular resource i.e.
server
Post method is used to return
the requested data to a
particular resource i.e. client
WWW.WHIZLABS.COM !40
41. 58. Differentiate ServletConfig and ServletContext.
Answer – In servlet, the difference between ServletConfig and
ServletContext is as follows –
The request data is sent in the
header, so only the limited data
can be sent
The response data is sent in the
body, so large amount of data
can be sent
doGet method of servlet handles
the Get method
doPost method of servlet
handles the Post method
Get method is no secure as the
data is visible in the URL
Post method is secured as the
data is not visible in the URL
It is possible to bookmark Get
method
It is not possible to bookmark
Get method
Get method is idempotent i.e. it
provides same result on the
multiple executions
Post method is non-idempotent
i.e. it provides different results
on the multiple executions
The Get method is most
commonly used and is more
efficient as compared to the Post
method
The Post method is less used
and is even less efficient as
compared to the Get method
ServletConfig ServletContext
It denotes single servlet
It denotes the complete set of
running web application, and is
same for all the servlets
The scope of ServletConfig is
servlet wide as it is defined
within the servlet section of the
web.xml file
The scope of ServletContext is
application wide as it is define
outside the servlet section of the
web.xml file
getServletConfig( ) method
provides the config object
getServletContext( ) provides the
context object
WWW.WHIZLABS.COM !41
42. 59. What do you understand by servlet collaboration?
Answer – The communication between two servlets is known as the
servlet collaboration. The different methods through which servlets
communicate like sendRedirect( ) method, RequestDispacher interface
and others.
60. How will you differentiate sendRedirect( ) method and forward( )
method?
Answer – The difference between sendRedirect( ) and forward( ) method
is as follows –
61. What is the meaning of session tracking?
Answer – Session indicates a specific time interval in servlet while
session tracking is a method to manage or maintain the user state, also
known as session management in servlet.
It belongs to a specific servlet so
acts as a local parameter
It belongs to the whole web
application so acts as a global
parameter
sendRedirect( ) method forward( ) method
sendRedirect( ) method uses
browser URL bar so, always sends
a new request
forward( ) method sends the
existing request from a servlet to
the resource of another servlet
The scope of sendRedirect( )
method is not only within the
server but also outside of the
server
The scope of forward( ) method
id within the server I.e. it can’t
work outside the server
sendRedirect( ) method works at
the client side
forward( ) method works at the
server side
WWW.WHIZLABS.COM !42
43. As the http protocol is stateless due to which every request generated by
a user is consider it is required to maintain the state using any of the
session tracking techniques. The session tracking is done to recognize a
particular user.
62. Explain cookies in servlet.
Answer – Cookie is defined as a small piece of information that
continues to remain between the requests of multiple clients.
Cookie has a name, value, and some other attributes version number,
domains and path qualifiers, comment, and a maximum age.
A cookie can be persistent, that remains valid for multiple sessions or
non-persistent that remains valid only for one session.
Hibernate Java Interview Questions
Here in seventh section, we’ll cover the list of Hibernate Java interview
questions. If there are any Hibernate Java interview questions, you want
to find the answer, just post it in the comment section and our expert
team will respond with the detailed answer.
63. What do you know about hibernate framework?
Answer – Hibernate is a lightweight, open source, ORM tool. The
hibernate framework is meant to simplify the Java application
development in order to interact with the database.
WWW.WHIZLABS.COM !43
44. The hibernate framework has many advantages, these are:
• Hibernate framework is lightweight and open source under LGPL
licence.
• Hibernate framework uses Hibernate Query Language (HQL) that is
independent of database.
• Due to the use of cache, the performance of hibernate framework is
very fast.
• It make complex joins simpler so it is easy to retrieve data from
multiple tables.
• Hibernate framework facilitates the automatic creation of tables of
the database.
• With the Query cache supporting feature, hibernate framework
provides status of database and statistics of query.
64. Define ORM.
Answer – Object Relation Mapping (ORM) is a technique of programming
used for the mapping of data with the data stored in the database. An
ORM tools makes the process of data access, data creation, and data
manipulation simpler.
The Object Relation Mapping tool uses JDBC APIs to create an
interaction with the database.
65. What do you know about Hibernate Query Language (HQL)?
WWW.WHIZLABS.COM !44
45. Answer – Hibernate Query Language is an object oriented query
language that is much similar to the Structured Query Language.
Hibernate Query Language (HQL) has some advantages over Structured
Query Language (SQL), these are –
• HQL is independent of database; no need to change the HQL query
if database is changed
• The previous knowledge or experience with SQL is not required to
work with HQL
• It is easier and simpler to write query with HQL as compared to
SQL
66. Name the core interfaces of Hibernate.
Answer – There are six core interfaces in the hibernate framework, these
are:
• Session
• SessionFactory
• Configuration
• Criteria
• Query
• Transaction
67. Differentiate first level cache from second level cache.
Answer – The first level cache is different form second level cache in
hibernate. The differences between the two are:
WWW.WHIZLABS.COM !45
46. 68. How many states of object are there in hibernate?
Answer – There are 3 states of object in hibernate:
1. Transient – When the object is created, it is said to be in the
transient state. In the transient state, the object does not have any
primary key. Also, the session is not created for the object in this
state.
2. Persistent – When the session is created for the object and is open,
the object is said to be in persistent state. This state starts when
the instance of the object is saved in the database or retrieved
from the database.
3. Detached – When the session of the object is closed, the object is
said to be in detached state. The object can also reach to the
persistent state again after this state if you invoke update() or
lock() method.
69. Name the different types of association mapping in hibernate.
Answer – There are four different types of association mapping in
hibernate.
• One to One
First Level Cache Second Level Cache
The first level cache is
associated with the Session
interface of hibernate.
The second level cache is
associated with the SessionFactory
interface of hibernate.
The first level cache is by
default enabled.
The second level cache is not by
default enabled. It is required to
enable it manually.
WWW.WHIZLABS.COM !46
47. • Many to One
• One to Many
• Many to Many
70. Differentiate persist() and save() method of session of the
hibernate.
Answer – Following is the difference between persist() and save()
method of session of the hibernate.
71. Name the different strategies for inheritance mapping in hibernate.
Answer – There are three different types of strategies for inheritance
mapping in hibernate:
• Table per subclass; the tables are created according to the class
but related to the foreign key
• Table per hierarchy; only one table is created to map the whole
hierarchy
• Table per concrete class; tables are created according to the class.
persist( ) save( )
The persist( ) method does not
return anything.
The save( ) method returns the
instance identifier.
The syntax of persist( ) method
is –
public void persist(Object a)
The syntax of save( ) method is –
public Serializable save(Object a)
It’s return type if void. It’s return type is Serializable.
WWW.WHIZLABS.COM !47
48. 72. How will you make a class immutable in hibernate?
Answer - By default, a class is set to be mutable with the true value of
mutable i.e. mutable = “true”. In order to make a class immutable, you
will require to mark the value of mutable false i.e. mutable = “false”.
73. Differentiate merge() and update() method.
Answer – The difference between merge() and update() method is as
follows:
74. What do you know about lazy loading in hibernate?
Answer – Lazy loading is a technique that is used to improve the
performance in hibernate. It results in faster performance by loading the
child object on the basis of demand.
Lazy loading is by default enabled in Hibernate 3 and later versions. It
means you don’t require to set the value of lazy to true I.e. lazy = “true”. It
specifies that you won’t require to load child objects if the parent object
has already been loaded.
merge() method update() method
The merge method is used to
combine something.
The update method is used to edit
something.
The merge method is used when
the state of the session is not
known.
The update method is used when
the session is not in the persistent
state.
It is used to make the
modifications at any time.
It is only used inside the session.
It doesn’t throw an error when
session is in detached state.
It throws an error when session is
in detached state.
WWW.WHIZLABS.COM !48
49. Spring Java Interview Questions
In the eighth section, here we cover the Spring Java interview questions
and answers. Go through these basic and advanced Spring framework
Java interview questions and broaden your knowledge to crack the
interview. If you have any other Spring-based Java interview questions,
please post in the comment section.
75. Define Spring and explain the advantages of spring framework.
Answer – Spring is a lightweight, integrated, and loosely coupled
framework that is used for the development of the enterprise
applications with Java programming.
Sometimes the Spring framework is considered to be the framework of
frameworks as it supports many frameworks such as Hibernate, Struts,
EJB, Tapestry, JSF etc. Followings are the advantages of spring framework
–
• Lightweight
• Integrated
• Loose Coupling
• Predefined Templates
• Easy Testing
• Faster Development
• Declarative Support
• Powerful Abstraction
76. What are the various Spring Modules?
WWW.WHIZLABS.COM !49
50. Answer – The spring framework is consisted of various modules which
are grouped as Test, Spring Core Container, Instrumentation, Aspects, AOP,
Web (MVC/Remoting), and Data Access/Integration.
Let’s know more about these modules of spring framework –
Test – The test layer is responsible to provide the testing support with
the testNG and JUnit modules.
Core Container – The spring core container is composed of three
modules, these are –
Context – It supports EJB, Internationalization, Basic Remoting, and JMS.
Core and Beans – It provides Dependency Injection and IOC features.
Expression Language – It provides support to accessing indexers and
collections, getting and setting property values, arithmetic and logical
operators, method invocation, named variables, object retrieval by name
and others.
Instrumentation, Aspects, and AOP – The instrumentation module is
meant to support to the class loader and class instrumentation
implementations.
The aspects module is made to support the integration by means of the
AspectJ.
WWW.WHIZLABS.COM !50
51. The AOP module is known to provide support to the implementation of
the aspect-oriented programming to make use of pointcuts, advices etc.
for the decoupling of the code.
Web (MVC/Remoting) – This layer of spring framework is composed of
Web, Web-Struts, Web-Servlet, and Web-Portlet modules which are used
to provide support for the development of web applications in Java.
Data Access/ Integration – This group in spring framework includes OXM,
JDBC, JMS, ORM, and Transaction modules which are made to provide
support for the database interaction.
77. Explain Autowiring in Spring.
Answer – Autowiring is a programming technique that helps programmer
to automatically inject the bean without writing any injection logic
explicitly.
The code for the bean injection (with the help of dependency injection)
is –
<bean id= “emp” class= “com.javapoint.Student” autowire= byFName” />
There are different autowiring modes in spring, these are –
Name of
Autowiring
Module
Details
constructor It performs the injection of bean using constructor.
WWW.WHIZLABS.COM !51
52. 78. Explain various bean scopes in Spring.
Answer – The spring framework contains 5 bean scopes that are
explained below:
79. Mention some Spring annotations you have used.
Answer – Here are the spring annotations that I’ve used in my Java
projects:
@ResponseBody – to send Object as response. It was mainly used for
sending JSON and XML data as response.
byName
It performs the injection of bean on the basis of the
name of the property by using setter method.
byType
It performs the injection of the bean on the basis of
the type of the property by using setter method.
no
This mode specifies that the autowiring is disable. It
is the default mode of the autowiring.
Name of
the
Scope
Description
session
The instance of the bean is created as per the HTTP
session.
request
The instance of the bean is created as per the HTTP
request.
prototype
The instance of the bean is created at the time when it is
requested.
globalses
sion
The instance of the bean is created as per the global
session of HTTP.
singleton
The instance of the bean is created only once and is
returned by the IOC container. Singleton is the default
spring scope.
WWW.WHIZLABS.COM !52
53. @Controller – used for controller classes
@PathVariable – to map dynamic values from URI to handler method
arguments
@RequestMapping – to configure URI mapping in controller handler
methods
@Qualifier – for avoiding confusion among multiple instances of bean
type
@Autowired – to autowire dependencies in beans
@ Scope – for the configuration of the scope of bean in spring
@Service – used for service classes
@ComponentScan, @Configuration, and @Bean – used for the
configurations based on Java
@Aspect, @After, @Before, PointCut, and @Around – for the
configuration of advices and aspects
80. Have you ever integrated Spring framework with Hibernate
framework? Explain.
Answer – Yes, I have integrated Spring framework with Hibernate
framework by using Spring ORM module.
WWW.WHIZLABS.COM !53
54. While using Hibernate 3+ where current session is provided by
SessionFactory, HibernateDaoSupport and usingHibernateTemplate
classes should be avoided. Instead, DAO pattern was used along with
dependency injection for the purpose of integration.
Spring ORM was used over Hibernate boiler-plate code in order to
implement transaction management
81. What do you know about IOC? Explain in detail.
Answer – IOC is an abbreviation for Inversion of Control, it is a design
pattern that is used to provide loose coupling. it is a container that is
responsible for instantiation, configuration, and assembly of the objects.
It retrieves information from XML files and then works. It is used for the
removal of the dependencies from the program.
IOC container is responsible to perform the following functions –
For the instantiation of the application class
For the configuration of the object
In order to assemble the object’s dependencies
Sample IOC Code:
public class Student{
WWW.WHIZLABS.COM !54
55. Name name;
Student(Name name){
This.address=address;
}
}
82. Explain how is exception handling performed in Spring framework.
Answer – There are different ways to handle exceptions in spring
framework:
Global Exception Handler – The exceptions can be handled by defining
global exception handler. The global exception handler can be defined
by using @ControllerAdvice annotation with the class.
Controller based – In this, the exception handler method is defined in the
controller classes. The annotation @ExceptionHandler is used for
controller based exception handling.
Implementation of HandlerExceptionResolver – In static pages, it is
required to handle the generic exceptions. For this, the
HandlerExceptionResolver interface in Spring framework is implemented
for creating global exception handler.
WWW.WHIZLABS.COM !55
56. 83. State the advantages of JdbcTemplate in Spring.
Answer – Followings are the advantages of JdbcTemplate in Spring:
• JdbcTemplate provides various methods using those you can
directly write the queries. In this way, JdbcTemplate saves the a lot
of time as well as work.
• When you use JdbcTemplate class, you don’t require to create
statement, connection, close connection, start transaction, and
commit transaction for the execution of various queries. So,
JdbcTemplate class allows the programmer to perform direct
execution of the query.
84. Name the different types of advice in Spring Aspect Orient
Programming (AOP).
Answer – The Spring AOP provides of five types of advices, these are –
• Around Advice
• Throws Advice
• After Advice
• After Returning Advice
• Before Advice
85. Differentiate between ApplicationContext and BeanFactory.
Answer – The difference between ApplicationContext and beanFactory is
as follows:
ApplicationContext BeanFactory
WWW.WHIZLABS.COM !56
57. JSP Java Interview Questions
In this ninth section, we cover the JSP Java interview questions and
answers. Go through these JSP Java interview questions and prepare
yourself for the Java interview. If you have any other JSP Java interview
questions, please post in the comment section.
86. What is JSP?
Answer – Java Server Pages (JSP) is a Java technology that is used to
develop web applications. It offers some more functionality and features
than servlet i.e. JSTL, expression language, custom tags etc. so it is
considered as the extension of servlet technology.
The ApplicationContext is an advanced spring
container.
The BeanFactory is
a basic spring
container.
The ApplicationContext is the extension of the
BeanFactory interface.
The BeanFactory
interface is not an
extended
interface.
ApplicationContext interface provides some
additional facilities – message resource
handling, integration with spring AOP, and many
others.
BeanFactory
interface provides
the basic facilities.
WWW.WHIZLABS.COM !57
58. A Java Server Page is composed of JSP tags along with HTML tags. It is
easy to maintain JSP pages as it does not combine development and
designing.
Advantages of JSP –
• Easy to maintain
• Additional functionality
• Faster development
• Less coding
87. Explain the lifecycle of a JSP page.
Answer – The lifecycle of a JSP page involves following phases –
JSP Page Translation
JSP Page Compilation
Class file loading by class loader (Classloading)
Creation of generated servlet object (Instantiation)
Invocation of jspInit( ) method by container (Initialization)
Invocation of jspService( ) method by container (Request Processing)
Invocation of jspDestroy( ) method by container (Destroy)
WWW.WHIZLABS.COM !58
59. 88. What do you know about JSP Implicit Objects?
Answer – JSP Implicit Objects are those which are created by the web
container and can be used by any of the JSP page. In Java, nine JSP
Implicit Objects are there.
Following table covers all the JSP implicit object with their types.
89. What do you know about JSTL?
Answer – JSTL stands for JSP Standard Tag Library that contains a set of
tags for the development of JSP pages.
• JSTL has the following advantages –
• Code Reusability
• Fast Development
• Avoids the use of scriptlet tags
90. What are the different types of JSTL tags?
Answer – There are 5 types of JSTL tags –
Object Name Object Type
request HttpServletRequest
page Object
pageContext PageContext
application ServletContext
session HttpSession
out JspWriter
config ServletConfig
exception Throwable
response HttpServletResponse
WWW.WHIZLABS.COM !59
60. Core Tags:
The JSTL core tags help in URL management, variable support, flow
control etc.
The prefix c used for core tags.
The URL for core tags is http://java.sun.com/jsp/jstl/core
XML Tags:
The JSTL XML tags help in transformation, flow control etc.
The prefix x used for core tags.
The URL for XML tags is http://java.sun.com/jsp/jstl/xml
Function Tags:
The JSTL function tags are used to provide support for string length and
string manipulation.
The prefix fn used for function tags.
The URL for function tags is http://java.sun.com/jsp/jstl/functions
SQL Tags:
WWW.WHIZLABS.COM !60
61. The JSTL SQL tags are used to provide SQL support for the development
of JSP pages.
The prefix sql used for SQL tags.
The URL for SQL tags is http://java.sun.com/jsp/jstl/sql
Formatting Tags:
The JSTL formatting tags are used to provide support for message,
number, and date formatting etc.
The prefix fmt used for formatting tags.
The URL for formatting tags is http://java.sun.com/jsp/jstl/fmt
91. Have you ever heard about EL in JSP?
Answer – In JSP, EL means Expression Language. The EL is used in order
to make the objects accessibility simpler in JSP. The expression language
provides a number of objects such as session, sessionScope,
applicationScope, param, request, requestScope and many others. These
objects can be directly used in JSP in a simple manner.
92. Differentiate between Java beans and Java custom tags.
Answer – The difference between Java beans and Java custom tags is as
follows:
WWW.WHIZLABS.COM !61
62. 93. Name the tags that are used in the development of Java beans.
Answer – Three tags are used for the development of Java beans, these
are:
jsp:useBean
Jsp:getProperty
jsp:setProperty
94. Write the statement that disables session in JSP.
Answer – The statement that disables session in JSP is:
<%@ page session=“fasle” %>
95. H ow a r e t h e co n t ex t . g e t Re q u e s t D i s p a t c h e r ( ) a n d
request.getRequestDispatcher() different in terms of use?
Java Beans Java Custom Tags
Java beans cannot manipulate
JSP content.
Java custom tags can manipulate
JSP content.
It is simple to set up Java beans.
It is comparatively harder to set up
Java custom tags.
Java beans are helpful to reduce
the complex operations into
simpler form.
Java custom tags are helpful to
reduce the complex operations
into simpler form.
Java beans is available in all 1.x
versions of JSP.
Java custom tags can only be used
in JSP 1.1
WWW.WHIZLABS.COM !62
63. Answer – In order to create context.getRequestDispatcher(path), it
relative path of the resource is required to be given while in order to
create request.getRequestDispatcher(path) absolute path of the resource
is required to be given alongwith.
96. Name the directive used in JSP custom tag. How will you perform
the exception handling in JSP?
Answer – The directive used in JSP custom tag is JSP tag lib directive.
The exceptions in JSP can be handled in two different ways:
1. By the errorPage element of web.xml file
2. By the errorPage element of page directive
97. What is the use of JSP in MVC model?
Answer – JSP performs the role of the view in Model View Controller. It is
used for the purpose of presentation in MVC model. The MVC is meant to
deal with the calling of business classes and model to get the data. After
that, this received data is presented to JSP to render to the client.
98. Name the various scope values for <jsp:useBean> tag.
Answer – The scope value represents the bean scope i.e. scope of the
bean. There are four different scopes of the bean.
• page
• session
• request
WWW.WHIZLABS.COM !63
64. • application
The default value of bean scope is page.
99. Differentiate between include action and include directive.
Answer – The difference between include action and include directive is
as follows:
100.Did you find JSP technology extensible?
Answer – Yes, I found JSP technology extensible. The JSP technology is
considered extensible as it comes with custom tags or actions that are
encapsulated within tag libraries.
Cover Up
So here we reach the end of the Java interview questions blog. The
questions and answers covered in this Java Interview Questions blog are
the frequently-asked Java interview questions that the recruiters ask to
Java Professional in a Java interview. These are the Java Interview
Questions that will definitely help you ace your job interview.
Include Action Include Directive
It includes content at the time of
request.
It includes content at the
time of page translation.
It does not include the original
content.
It includes the original
content.
Include action invokes the include( )
method of the Vendor provided class.
Include directive doesn’t
invoke any method.
Using include action is better for the
dynamic pages.
Using include directive is
better for the static pages.
WWW.WHIZLABS.COM !64