Posts

Tell Me Something About Yourself - Interview Answers.

Try to introduce some of your most important employment-oriented skills as well as your education and accomplishments to the interviewer. Answer to this question is very important because it positions you for the rest of the interview. That's why this statement is often called the " Positioning Statement".

One should take the opportunity to show his/her communication skills by speaking clearly and concisely in an organized manner. Since there is no right or wrong answer for this question hence it is important to appear friendly.



YOUR ANSWERS CAN BE:

1) I am a person with strong interpersonal skills and have the ability to get along well with people. I enjoy challenges and looking for creative solutions to problems.

2) Besides the details given in my resume, I believe in character values, vision and action. I am quick in learning from mistakes. I am confident that the various tests that you have conducted will corroborate my competencies aptitude and right attitude for th…

Top 200 Java Interview Questions With Answers.

1. What Do You Know About Java?

Answer: Java is a high-level programming language originally developed by Sun Microsystems and released in 1995. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.

2. What Are The Supported Platforms By Java Programming Language?

Answer: Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of
UNIX/Linux like HP-Unix, Sun Solaris, Redhat Linux, Ubuntu, CentOS, etc.

3. List Any Five Features Of Java?

Answer: Some features include:
Object Oriented.Platform Independent.Robust.Secured & Dynamic.Multi-threaded.
4. Why Is Java Architectural Neutral?

Answer: It’s compiler generates an architecture-neutral object file format, which makes the compiled code to be executable on many processors, with the presence of Java runtime system.

5. How Java Enabled High Performance?

Answer: Java uses Just-In-Time compiler to enable high performance. Just-In-Time compiler is a program that turns Java byt…

Page VIII - Java Interview Questions With Answers.

176. What Is The Difference Between The Size & Capacity Of A Vector?

Answer: The size is the number of elements actually stored in the vector, while capacity is the maximum number of elements it can store at a given instance of time.

177. Can A Vector Contain Heterogenous Objects?

Answer: Yes a Vector can contain heterogenous objects. Because a Vector stores everything in terms of Object.

178. What Is An Enumeration?

Answer: An enumeration is an interface containing methods for accessing the underlying data structure from which the enumeration is obtained. It allows sequential access to all the elements stored in the collection.

179. What Is Difference Between Path & Classpath?

Answer: Path and Classpath are operating system level environment variables. Path is defines where the system can find the executables. exe files and classpath is used to specify the location of .class files.

180. Can A Class Declared As Private Be Accessed Outside It's Package?

Answer: No, it's not poss…

Page VII - Java Interview Questions With Answers.

151. What Are Order Of Precedence & Associativity & How Are They Used?

Answer: Order of precedence determines the order in which operators are evaluated in expressions. Associativity determines whether an expression is evaluated left-to-right or right-to-left.

152. What Is Type Casting? What Is Downcasting? Can A Double Value Be Cast To A Byte?

Answer: Type casting means treating a variable of one type as though it is another type.
Downcasting is the casting from a general to a more specific type, i.e. casting down the hierarchy.

Yes, a double value can be cast to a byte.

153. Which Method Of The Component Class Is Used To Set The Position & Size Of A Component?

Answer: setBounds method is used for this purpose.

154. What Is The Range Of The Short Type?

Answer: The range of the short type is -2^15 to 2^15 - 1.

155. What Is The Immediate Superclass Of Menu?

Answer: MenuItem class

156. Does Java Allow Default Arguments?

Answer: No, Java does not allow Default Arguments.

157. Which Numb…

C Program To Compare Two Strings With/Without Using strcmp() Function.

C Program To Compare Two Strings Using strcmp Function

#include <stdio.h>
#include <string.h>

int main()
{
    char a[100], b[100];

    printf("Enter the first string\n");
    gets(a);

    printf("Enter the second string\n");
    gets(b);

    if (strcmp(a,b) == 0)
        printf("Entered strings are equal.\n");
    else
        printf("Entered strings are not equal.\n");

    return 0;
}


OUTPUT:

Enter the first string
Compare
Enter the second string
Compare
Entered strings are equal.



C Program To Compare Two Strings Without Using strcmp Function

#include <stdio.h>

int compare_strings(char [], char []);

int main()
{
    int flag;
    char a[1000], b[1000];

    printf("Input first string\n");
    gets(a);

    printf("Input second string\n");
    gets(b);

    flag = compare_strings(a, b);

    if (flag == 0)
        printf("Entered strings are equal.\n");
    else
        printf("Entered strings are …

C Program to Print "Hello World" Without Semicolon/Printf Command

C Program To Print "Hello World".

#include <stdio.h>

int main()
{
    // printf() displays the string inside quotation
    printf("Hello World");
    return 0;
}

OUTPUT:

Hello World


C Program To Print "Hello World" Without Using Semicolon.


#include <stdio.h>

void main()
{
    if(printf("Hello World"))
    { }
}

OUTPUT:

Hello World


C Program To Print "Hello World" Using #define.


#include <stdio.h>

#define PRINT printf("Hello")
void main()
{
    if(PRINT)
    { }
}

OUTPUT:

Hello World


C Program To Print "Hello World" Without Using printf.

#include <stdio.h>

main()
{
    char st[15] = "\nHello World\n";
    int n =0;
    while(st[n] != '\0')
    {
        putchar(st[n]);
        n++;
    }
}

OUTPUT:

Hello World


C Program To Print Semicolon Without Using A Semicolon .

#include <stdio.h>

int main()
{
    if(printf("%c",59))
    {
    }
}

OUTPUT:

;


ALSO READ:

-- Program To P…

Page VI - Java Interview Questions With Answers.

126. What Is The Difference Between An Interface & An Abstract Class?

Answer: An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract. An interface has all public members and no implementation.

127 .Can An Interface Extend Another Interface?

Answer: Yes an Interface can inherit another Interface, for that matter an Interface can extend more than one Interface.

128. If A Method Is Declared As Protected, Where May The Method Be Accessed?

Answer: A protected method may only be accessed by classes or interfaces of the same package or by subclasses of the class in which it is declared.

129. What Will Happen If Static Modifier Is Removed From The Signature Of The Main Method?

Answer: Program throws "NoSuchMethodError" error at runtime.

130. What Is The Default Value Of An Object Reference Declared As An Instance Variable?

Ans…

Page V - Java Interview Questions With Answers.

101. What's The Difference Between Constructors & Other Methods?

Answer: Constructors must have the same name as the class and can not return a value. They are only called once while regular methods could be called many times.

102. Is There Any Limitation Of Using Inheritance?

Answer: Yes, since inheritance inherits everything from the super class and interface, it may make the subclass too clustering and sometimes error-prone when dynamic overriding or dynamic overloading in some situation.

103. When Is The ArrayStoreException Thrown?

Answer: When copying elements between different arrays, if the source or destination arguments are not arrays or their types are not compatible, an ArrayStoreException will be thrown.

104. Can You Call One Constructor From Another If A Class Has Multiple Constructors?

Answer: Yes, use this syntax.

105. What's The Difference Between The Methods Sleep & Wait?

Answer: The code sleep2000; puts thread aside for exactly two seconds. The code wait2000, …