Skip to main content

Tavant Technologies Interview Questions

Hi Friends,

This interview is for 3 years experienced Java/J2EE guy.


First Round:


1) About project

2) All basics of Java – Encapsulation , Polymorphism, Over riding, inheritance, over loading

3) Exception handling – Checked and unchecked exceptions

4) Example for runtime exceptions

5) What is abstraction and difference between interface and abstract class

6) Basics of threads

7) Which one is preferable thread class or runnable interface

8) Single ton – Other design patterns - Write sample singleton class

9) Collections

10) What is the output:
Try{
sysout(“hello”);
some code written here which throw an exception
} catch(Exception e){
System.exit(0)
} finally{
Sysout (“end”);
}


11) A class Thread A with overridden run method.. {run(){Sysout("TT"); }}
A main program psvm{ a.run(); // call run
a.run(); // call run
a.start(); //start the thread
}
What happens, what is the output?

12) Some basic questions on select queries.

13) Many more… small programs

Second Round:

1) About project

2) Difference between Stringbuffer and stringbuilder

3) Reversing a string without using string.reverse : http://www.java2s.com/Code/Java/Language-Basics/ReverseStringTest.htm

4) What is singleton, factory, façade – definitions and how you implement.

5) What is MVC

6) What is deadlock and write a sample code for deadlock and tell me how you solve this deadlock. Without using wait or notify

7) Thread A obj, Thread B obj, Thread C obj for the same class and that class contains 3 static synchronized methods so when we start the 3 threads say a.meth1, b.meth2, c.meth3 what will happen – does all three will execute or only one

8) What are different types of locks? (class lock/object lock)

9) Added to question 7 , if I have a static long l =10 class variable and in all three methods I have given l++ then what will happen.

10) Difference between Classnotfound exception and noclassdeffound exception

11) Different HTTP status codes like 200, 500, 402, 401,404 etc

12) Spring questions

13) Servlet lifecycle and portlet lifecycle and differences between them

14) When sevlet lifecycle methods are executed and loaded? what does the web container does when request comes and when destroy() executes.

15) Difference between include and forward

16) Request dispatcher and send redirect differences with that what happens internally when you use send redirect.

17) Hashcode questions.. why you override both hashcode and equals method

18) What algorithm is used for hashcode

19) What algorithm is used for hashmap and how is it implemented

20) Class a then a obj1 = new a() then a obj2 = new a() what will return obj1 == obj2 and obj1 == obj1 and what happens internally

21) Added to question 20 class a obj1.equals(obj2) internally what happens

22) Added to question 20 class a has a new variable static long i==0 and overridden equals method says{ i==i} and hashcode method now obj1 == obj2 what happens

23) What is webservices

24) How you deploy a war file in tomcat without using tomcat admin

25) What is serialization and internally what happens when you serialize it and advantages of it.

26) About synchronization also

27) Why u want to shift your company

28) Two tables

Table name : Employee Dept
Name Name
EMP id EMP id
Salary Dept id

Get all the employees with dept name as IT
get first five employees with highest salary with dept name IT.
Get the emp Ids who are not there in dept table.

29) Some more… which I don’t remember……… :)

Let me know if you have any questions or answers in comments. Thank you.

Please contact me if you wish to contribute.

Comments

  1. You can copy this program and try it out where you can able to answer atleast 5 to 6 questions above.

    import java.util.ArrayList;
    import java.util.List;

    public class OnlyOneInMethod {
    private String objID;
    static int num = 10;
    public OnlyOneInMethod(String objID) {
    this.objID = objID;
    }


    public OnlyOneInMethod() {
    // TODO Auto-generated constructor stub
    }


    public static synchronized void doStuff(int val) {

    System.out.print("entering doStuff()" + num);
    //num = val + 2 ;
    num++;
    System.out.println("doStuff variable num=" + num);

    /*try {
    Thread.sleep(2000);
    } catch (InterruptedException x) {
    }*/

    System.out.print("leaving doStuff()");
    }
    public static synchronized void doStuff1(int val) {

    System.out.print("entering doStuff1()" + num);
    //num = val + 2 ;
    num++;
    System.out.println("doStuff1 variable num=" + num);

    /* try {
    Thread.sleep(2000);
    } catch (InterruptedException x) {
    }
    */
    System.out.print("leaving doStuff1()");
    }
    public void print(String msg) {
    threadPrint("objID=" + objID + " - " + msg);
    }

    public static void threadPrint(String msg) {
    String threadName = Thread.currentThread().getName();
    System.out.println(threadName + ": " + msg);
    }
    public boolean equals(OnlyOneInMethod o){
    return this.num == o.num;

    }

    public static void main(String[] args) {
    OnlyOneInMethod ooim = new OnlyOneInMethod("obj1");
    OnlyOneInMethod ooim2 = new OnlyOneInMethod("obj1");

    System.out.println(ooim == ooim2);
    System.out.println(ooim.equals(ooim2));
    System.out.println(ooim == ooim);

    String s = "hello";
    String s1 = new String("hello");

    System.out.println(s == s1);
    System.out.println(s.equals(s1));
    System.out.println(s == s);

    Runnable runA = new Runnable() {
    public void run() {
    doStuff(3);
    //doStuff1(3);
    }
    };

    Thread threadA = new Thread(runA,"ThreadA");


    /*try {
    Thread.sleep(200);
    } catch (InterruptedException x) {
    }*/

    Runnable runB = new Runnable() {
    public void run() {
    doStuff1(7);
    }
    };

    Thread threadB = new Thread(runB,"ThreadB");
    threadA.start();
    threadB.start();
    }
    }

    ReplyDelete
  2. Is television really that harmful to kids? Depending on the show and duration of watching, yes. Researchers have found that exposure to programs with fast edits and scene cuts that flash unrealistically across the screen are associated with the development of attentional problems in kids. guarantor loans

    ReplyDelete

  3. The great service in this blog and the nice technology is visible in this blog. I am really very happy for the nice approach is visible in this blog and thank you very much for using the nice technology in this blog

    software testing course in chennai

    ReplyDelete
  4. The emergence of large online travel agencies changed the rules of the business across the globe. Fuel prices and global economic conditions added to the challenges of earning healthy margins.ASUS Rog Strix Z370-E review

    ReplyDelete
  5. This is an awesome post. Really very informative and creative contents. This concept is a good way to enhance knowledge. I like it and help me to development very well. Thank you for this brief explanation and very nice information. Well, got good knowledge.
    WordPress website development Chennai

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete

Post a Comment

Popular Posts

Use Address bar effectively - Easy address bar commands

You are already familiar with quite a few browser address bar shortcuts. For instance, type some text in the address bar of your browser (e.g. apple), press Ctrl + Enter and the browser will automatically send you to the corresponding .com website (in this case, www.apple.com) Or type in some complex search query (e.g., site:firefox.com internet explorer) in the address bar, hit go and the browser will show results from your default search engine*. The address bar of Google Chrome is even smarter as it can offer live suggestions while you are typing the search query.
Other than these built-in shortcuts, you may also want to know about a couple of URL hacks (a better term would be "address bar commands") that let you do stuff from the address bar itself  – they are pretty easy to remember and don't require you to install any bookmarklets or add-ons (so you can use them on any computer and even some mobile phones).

1. Download videos from Youtube with URL Change easily – If …

DOT NET Interview Questions with Answers

When not to use Design Patterns?Do not use design patterns in any of the following situations.• When the software being designed would not change with time.• When the requirements of the source code of the application are unique.If any of the above applies in the current software design, there is no need to apply design patterns in the current design and increase unnecessary complexity in the design.When to use Design Patterns?Design Patterns are particularly useful in one of the following scenarios.• When the software application would change in due course of time.• When the application contains source code that involves object creation and event notification.Benefits of Design Patterns:The following are some of the major advantages of using Design Patterns in software development.• Flexibility• Adaptability to change• ReusabilityWhat are Design Patterns?A Design Pattern essentially consists of a problem in a software design and a solution to the same. In Design Patterns each pattern…

Free Softwares , freewares : 16 July 09

Recover Files

Recover Files can undelete/recover deleted files. Its features
include: recovers files after deletion in the Recycle Bin, files
deleted from a network share, DOS command prompt, Shift+Delete is
used, when Move or Cut command are used, from Hard drives, floppy
disks, external USB disk / flash drivers, deleted by other
applications or by viruses, and much more; Supports FAT16, FAT32, NTFS
and NTFS 5 file systems; Performs non-destructive and read-only scan
and file recovery; Restores original create and modified file dates;
Supports unicode and non-alphabet languages; Filters files by name,
extension, folder and file type.

The 1.16 MB Recover Files, version 3.10 (July 06, 20079) for Windows
Vista, Windows 2003, Windows XP, Windows 2000, Windows 95, 98, ME and
Windows NT 4 can be downloaded at http://www.UndeleteUnerase.com/download.html

Exl-Plan Free

Exl-Plan Free is an Excel-based business finance planner, can be used
either for immediate or later projections, by both s…

MobileComm Recruits Freshers

Freshers IT Job Opening at MobilecommExperience: 0 - 1 Years 

Location: Delhi/NCR

Education: 
UG - B.Tech/B.E. - Computers, Electrical, Electronics/Telecomunication, Instrumentation   
PG - Post Graduation Not Required 

Industry Type: Telcom/ISP

Functional Area:
IT-Support, Telecom, Hardware

Job Description: 


*GSM Fundamentals. *RF Planning & Optimization. *Transmission Planning & Optimization. *3G Technologies
Desired Candidate Profile

B.E./B.Tech E&C, Telecommunication, Computers, IT 0 to 1 Yrs. experience Willing to work in GSM Mobile Industry Willing to travel anywhere in India Willing to undergo Job Oriented Training on self support basis
Company Profile
MobileComm Technologies (India) Pvt. Ltd. is subsidiary of MobileComm Professionals, Inc. USA - MobileComm Professionals Inc. is an engineering services organization supporting telecom cellular operators and OEM's to design, deploy and manage wireless networks. MobileComm is ISO9001 certified organization offering comp…

PDFzen: Simple document sharing.

PDFzen

You don't need to create an account to use PDFzen. Just upload your document and start editing. When you are finished, you can download the document as a PDF or get the link to share via email or social media. HTML5 PDF editing means PDFzen works right from the browser of your iPhone or iPad.

Features

Share
Easily share your document in many different ways.

Sign or Draw
Sign or draw anywhere on a document with the draw tool.

Type
Use the type tool to type on any part of a document.

Highlight
Point out important areas.

File Formats
.pdf, .doc, .docx, .xls, .xlx, .odt, .rtf)

Mobile-friendly
View and edit your PDFs on your PC, your phone, or your tablet.

Need to scan to PDF?
Use deskPDF Reader to scan your documents into PDF format, fill out forms, and easily share them with PDFzen integration.

Wallet_friendly

PDFzen will always be free to mark up, share and collaborate on documents. No strings attached, aver the developers

Check it out at https://pdfzen.c…

IBM Weekend Hiring for Java Professionals - 24th Nov 2012

Urgent Hiring Requirements for Java Professionals

Dear IBMer,

We solicit your help in bringing your friends and family members who qualify to apply for the given positions only.
We need your help & support to close the below positions. Please refer us good profiles like yours only & help us in closing the requirement.

Requirements Summary:

Please adhere to the demand:--

Skill -Java/J2EE with Spring/Hibernate/Struts
Exp Range - 3 to 4 yrs only (Please do not refer above 4yrs and below 3yrs as we will not be able to call them for the interview)
Joining Location - Pune/Kolkata/Chennai/Hyderabad

Interview Location - Bangalore/Chennai/Kolkata
Interview Date - 24th Nov 2012 (Only)


Important Note:Please refer to the above demand and share the profiles only for them to get the Interview Process started Immediately.Looking forward to your support to help us close these demand through Employee Referral only.16 years of Education is mandatory.Please check with the candidates that whether they have …

Contact Form

Name

Email *

Message *