JAVA FORUM

Java Interview Questions 

1. Abstraction in java

Abstraction means we are exposing only essential parts to user, by hiding non -essential parts. For example car, rather than viewing individual components of car the user is viewing car as a car itself.
Abstraction is achieved in java through interface & abstract class

Why Streams are Lazy?

Each intermediate operation creates a new Stream but does not iterate elements and perform operations until the terminal operation is invoked.

What is covarient return type in java?

Covariant return type refers to the return type of overriding method. you do need of any type cast to check the return type.

Spring Bean scope

while defining a bean you can specify the scope of bean

@singleton : Only one instance of bean will be created through out the application
@prototype : new instance will be created on each request
@request : one instance for every http request
@session
@global-session


What are the advantages of spirng framework?

Lightweight

Loosely coupled using dependency injection

provide predefined templates for JDBC, JPA

can easily integrate other frameworks like hibernate.

spring supports caching, validations, transaction

configuration using xml, annotation, java

What are the advantages of spirng boot?

is an opinionated framework

is based on convention over configuration

has embeded tomcat

SpringApplication.run(App.class,args)

this line of code does start spring application context , interprets all annotations in the spring class, start tomcat server


6 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. Hi,

    any one there???

    org.apache.subversion.javahl.ClientException: E175002: connection refused by the server
    E175002: OPTIONS request failed on '/svn/project/VehicleTracker'

    Hi i am getting an error like this while using svn, How can i solve this?

    ReplyDelete
  5. One thing : check the port where the svn server is running, May be the firewall blocked that port

    the port may be already using by another applications.

    second thing : check whether the computer is shared and all users in the network can access this [password protection by windows]

    Thanking you..

    Javabelazy ....

    ReplyDelete

Your feedback may help others !!!

Facebook comments