Home / java / Virtusa Interview Questions for Java Experience Professionals

Virtusa Interview Questions for Java Experience Professionals

 

 

Role: Java Developer

Job Description: Core Java, Collections, Springs, Hibernate, PL/SQL

Questions :
– Tell about yourself
– Have you did any Certification.?
– Stored Procedure to remove all Duplicate Rows from Table
– What are immutable Classes
– How to create a custom immutable class
– In How many ways we create Objects in java
– Hashmap
– Equals method available in which class
– Serialization

Source Tree:
Who you resolve the conflicts in git push

Maven :
Pom.xml
How you download the dependencies using maven.?

Solutions : 

In How many ways we create Objects in java .?

  1. i) Using ‘new’ operator:

Test s=new Test();

  1. ii) Factory method:

Thread t=Thread.currentThread();

iii)  newInstance():

Class c=Class.forName(“Test”);

Object obj=c.newInstance();           àcreates Test class Object.

Test t=(Test)obj;

  1. iv) clone():

Test t1=new Test(10,20);

Test t2=t1.clone();

  1. v)   Deserialization:

FileInputStream fis=new FileInputStream(“Test.txt”);

ObjectInputStream ois=new ObjectInputStream(fis);

 UserDefSerCls   uds=new UserDefSerCls(,” ”,);

Ois.readObject(uds);

Ois.close();

 

 

– Equals method available in which class – Objects Class

Pom.xml
How you download the dependencies using maven.?

What is the output of below Program :

String s = new String("Hello");
String s = "Hello";
 <dependencies><dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>1.3.156</version> </dependency></dependencies> 

After adding the dependencies we run the command  “mvn clean package”. it downloads all the dependency jar files for me.


					
									

About Mohammad Fareed

Software Engineer @ Tekzenit.

Check Also

Object Creation in Java

1)How many ways are there to create an object? 1. How many ways to create …

One comment

  1. About My Self: My self Mohammad Fareed, graduated from JNTU Hyderabad, born and bought up from Manguru – Kothagudem. my Dad works as a turner in SColleries Company Limited. and Mother is a maker, younger brother working as software engineer in Co-Figure.
    Started my Career a Management Trainee and Current working in Tekzenit India Private Limited as an associate software engineer.
    I love to do the thing on the web, I made a blog Techdefeat.com to share my knowledge with all. My Hobbies are Playing Cricket and volleyball.

Leave a Reply

Your email address will not be published. Required fields are marked *