Skip to main content

Privado.com - A Private Search Engine

https://www.privado.com/ Your searches should be private. We make sure they really are.  Private Search in Action  We don’t track you  We don’t store your searches in any identifiable way  We don’t store your IP address in our services Your privacy is important.  There are no traces of your activities and personal identity in our servers.  You can learn more about privacy in our blog  We don't like cookies!   https://www.privado.com/

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 comment has been removed by the author.

    ReplyDelete
  6. I am amazed by the way you have explained things in this article. This article is quite interesting and I am looking forward to reading more of your posts. Thanks. Opt for the Triangle shape background vector free download

    ReplyDelete

Post a Comment

Popular Posts

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 • Reusability What are Design Patterns? A Design Pattern essentially consists of a problem in a software design and a solutio

Probationary/ Specialist Officers in Indian Bank

Probationary/ Specialist Officers Location :  Across India Eligibility: BE/ B.Tech (Che/ Electrical/ Mech/ Prdn/ Textile/ ETE/ ECE/ CS/ IT)/ MCA/ MBA www.freshersworld.com Details:     Indian Bank (A Govt of India Undertaking) Recruitment of Probationary Officers/ Specialist Officers (Industrial Development Officers/ Computer Officers) Indian Bank, a leading Public Sector Bank, with headquarters in Chennai having geographical presence all over India and abroad invites online applications from Indian Citizens for the following posts. Post Code Post Scale Total Vacancy Age as on 01.07.09 Min Max 1 Probationary Officers I 118 21 30 Specialist Officers         Industrial Development Officers in the following Engineering disciplines         2 Chemical I 02 21 30 3 Electrical I 02 21 30 4 Electronics I 02 21 30 5 Leather Technology I 02 21 30 6 Mechanical I 02 21 30 7 Production/ Metallurgy I 02

Free Softwares 09 July 09

JDownloader JDownloader, open source and platform independent, can help download files from file hosters like Rapidshare.com, Megaupload.com and others. JDownloader can be used by both kinds of users - those who have a premium account and those who don't pay. Features: Support for many file hosting sites, decrypt plug-ins for many services. e.g. sj.org, UCMS, WordPress, skips the limits of Filehosting websites, downloads in multiple paralell streams, download with multiple connections, captcha recognition, automatical file extraction, Can download Youtube, Vimeo, clipfish video, and Mp3 files; 24-hour support, integrates with Firefox, no installation needed, and more. The 15.6 MB JDownloader, v.0.6.193, cross-platform - works on Windows, Linux and Mac OS X, can be downloaded at http://jdownloader.en.softonic.com/download Runs on Java 1.5 or higher. jGnash jGnash is a free personal finance manager with many features available in commercial versions. Main Features

Mobile Number Portability in India by Sept 20

Department of Telecom has issued ( .pdf ) a notification stating that long awaited number portability will finally be available by September 20. The main object of number portability is to be able to retain the same number even after switching between different mobile service providers.   Mobile Number Portability gives a mobile subscriber the leverage of retaining his/her mobile phone number even after switching between networks. As per Department of Telecom - Mobile Number Portability is to be implemented in Delhi, Mumbai, Maharashtra and Gujarat Service areas of Zone I and Zone 2 includes Kolkata, Tamil Nadu, Chennai, Andhra and Karnataka of within six months of award of license by September 20, 2009, and in the rest of the country by March 20, 2010. Syniverse Technologies have been licensed for MNP operations in Zone I while MNP Interconnection got licensed for MNP operations in Zone 2.   TRAI will decide all kinds of mobile number portability tariffs like the transaction

DesignEvo - A free and easy online logo designer

DesignEvo is  easy-to-use online logo design tool with millions of icons, 100+ stylish  fonts, 3,000+ practical logo templates and handy editing tools. It can help  people easily create appealing and effective logos for their brands,  websites, blogs, social media channels, etc.  It is really awesome and intuitive interface. Easy to design and customize. A person can easily design by selecting a pre-defined logo design and modify it on the fly. Hardly you need 1 minute to design your new logo with minor modifications. Its really awesome site. I suggest you to try it out.   You can discover more about DesignEvo here: https://www.designevo.com Learn more about Designevo  @ YouTube designevo, free logo design, logo maker, create a logo, easy logo maker, design logo free, free logo, logo designs, logo images

Contact Form

Name

Email *

Message *