Thursday, September 8, 2016




                                      Java Syllabus

This course is specially designed for the people who are willing to join the Advanced Part of Java, in this we will cover all the Industrial aspects while teaching to the students.It covers all the new features of the advanced java with all three frameworks.
The Trainer is a well known name in corporate world, he has more than 4 years of experience in real time experience.

Topics Covered
JDK 1.7/1.8 New Features

• Introduction to Assertion
• Understanding Generics in Collections
• Enum
• Auto Boxing
• String Builder
• Varargs
• For in Loop
• Static imports
• Creating a Formatter
• Annotations Fundamentals
• Regular Expressions and Patterns
• Strings in switch Statement
• Type Inference for Generic Instance Creation
• Multiple Exception Handling
• Try with Resources
• Automatic null Handling
JDBC
• JDBC Introduction
• JDBC Architecture
• Common JDBC Components
• Steps to connect to the database (MySQL, Oracle)
• Creating JDBC Application
• JDBC - Exceptions Handling
• JDBC - Statements, Prepared Statement and Callable Statement
• JDBC - Data Types
• JDBC - Stored Procedures
• Which Driver should be used
• ResultSetMetaData and DatabaseMetaData
• Storing and retrieving file from datbase
• Transactions Management in JDBC
• Batch Processing in JDBC
Servlet
• Servlet Overview
• What are Servlet?
• Creating Servlet Application using Eclipse IDE & Tomcat Server
• Servlet life Cycle
• GenericServlet and HttpServlet
• Basics of Web
• HTTP, HTTPrequest Type, Difference between GET And POST method, WebContainer, Difference between WebServer and applicationServer, Content Type, Introduction to web.xml deployment Descriptor.
• Servlet API
• Exploring directory structures of Web Application.
• How to Change port number of Apache Tomcat
• How to deploy the project on Server
• Servlets - Http Status Codes
• ServletRequest and ServletResponse
• RequestDispacher and SendRedirect
• Servlet Config and Servlet Context
• Servlet Attribute and Servlet Parameter
• Session Tracking in Servlet
• Cookies,Hidden form field,URL Rewriting and HttpSession
• Event and Listener
• SingleThreadModel
• Servlet Filter
• Writing Filters, Filter life Cycle, types of filter, Servlet Filter Example, servlet Filter Mapping in Web.xml, Using Multiple Filters, Filters Application Order
• Servlets - Exception Handling
• Servlets - Cookies Handling
• Servlets - Database Access
• Servlets - File Uploading
• Servlets - Page Redirection
• Servlets - Hits Counter
• Servlets - Auto Page Refresh
JSP
• JSP - Overview
• JSP - Environment Setup
• JSP - Life Cycle
• JSP API
• JSP-Scripting elements
• JSP- Directive elements
• JSP- Action tags or elements
• Forward, include, useBean, setProperty, getProperty
• JSP - Custom Tags
• JSP-Implicit Objects
• JSP - Standard Tag Library (JSTL)
• JSP - Expression Language (EL)
• JSP - Exception Handling

Model Questions and Answer

1) What is difference between JDK,JRE and JVM?

JVM is an acronym for Java Virtual Machine, it is an abstract machine which provides the runtime environment in which java bytecode can be executed. It is a specification.

JVMs are available for many hardware and software platforms (so JVM is platform dependent).

JRE stands for Java Runtime Environment. It is the implementation of JVM.

JDK is an acronym for Java Development Kit. It physically exists. It contains JRE + development tools.

2) How many types of memory areas are allocated by JVM?

Many types:

Class(Method) Area
Heap
Stack
Program Counter Register
Native Method Stack

3) What is JIT compiler?

Just-In-Time(JIT) compiler:It is used to improve the performance. JIT compiles parts of the byte code that
have similar functionality at the same time, and hence reduces the amount of time needed for compilation.
Here the term “compiler” refers to a translator from the instruction set of a Java virtual machine (JVM) to the
instruction set of a specific CPU.

4) What is platform?

A platform is basically the hardware or software environment in which a program runs. There are two types of platforms software-based and hardware-based. Java provides software-based platform.

5) What is the main difference between Java platform and other platforms?

The Java platform differs from most other platforms in the sense that it's a software-based platform that runs on top of other hardware-based platforms.It has two components:

Runtime Environment
API(Application Programming Interface)

6) What gives Java its 'write once and run anywhere' nature?

The byte code. Java is compiled to be a byte code which is the intermediate language between source code and machine code. This byte code is not platform specific and hence can be fed to any platform.

7.) What is the difference between an Inner Class and a Sub-Class?

Ans: An Inner class is a class which is nested within another class. An Inner class has access rights for the class which is nesting it and it can access all variables and methods defined in the outer class.

A sub-class is a class which inherits from another class called super class. Sub-class can access all public and protected methods and fields of its super class.

Q8. What are the various access specifiers for Java classes?

Ans: In Java, access specifiers are the keywords used before a class name which defines the access scope. The types of access specifiers for classes are:

1. Public : Class,Method,Field is accessible from anywhere.

2. Protected:Method,Field can be accessed from the same class to which they belong or from the sub-classes,and from the class of same package,but not from outside.

3. Default: Method,Field,class can be accessed only from the same package and not from outside of it’s native package.

4. Private: Method,Field can be accessed from the same class to which they belong.

Q9. What’s the purpose of Static methods and static variables?

Ans: When there is a requirement to share a method or a variable between multiple objects of a class instead of creating separate copies for each object, we use static keyword to make a method or variable shared for all objects.

Q10. What is data encapsulation and what’s its significance?

Ans: Encapsulation is a concept in Object Oriented Programming for combining properties and methods in a single unit.

Encapsulation helps programmers to follow a modular approach for software development as each object has its own set of methods and variables and serves its functions independent of other objects. Encapsulation also serves data hiding purpose.

Q11. Can a class be declared as protected?
The protected access modifier cannot be applied to class and interfaces. Methods, fields can be declared protected, however methods and fields in a interface cannot be declared protected.

Q12. What is the access scope of a protected method?
A protected method can be accessed by the classes within the same package or by the subclasses of the class in any package.

Q13. What is the purpose of declaring a variable as final?
A final variable's value can't be changed. final variables should be initialized before using them.

Q14. What is the impact of declaring a method as final?
A method declared as final can't be overridden. A sub-class can't have the same method signature with a different implementation.

Q15. How is final different from finally and finalize()?
final is a modifier which can be applied to a class or a method or a variable. final class can't be inherited, final method can't be overridden and final variable can't be changed.

finally is an exception handling code section which gets executed whether an exception is raised or not by the try block code segment.

finalize() is a method of Object class which will be executed by the JVM just before garbage collecting object to give a final chance for resource releasing activity.

Q.16.Can a class declared as private be accessed outside it's package?
Not possible.

Q.17 Can a class be declared as protected?
The protected access modifier cannot be applied to class and interfaces. Methods, fields can be declared
protected, however methods and fields in a interface cannot be declared protected.

Q.18.What is the access scope of a protected method?
A protected method can be accessed by the classes within the same package or by the subclasses of the class in
any package.

Q.19.What is the purpose of declaring a variable as final?
A final variable's value can't be changed. final variables should be initialized before using them.

Q.20.What is the impact of declaring a method as final?
A method declared as final can't be overridden. A sub-class can't have the same method signature with a different implementation.

Q.21 I don't want my class to be inherited by any other class. What should i do?
You should declared your class as final. But you can't define your class as final, if it is an abstract class.A class declared as final can't be extended by any other class.

No comments:

Post a Comment