Tuesday, September 24, 2013

HTML Interview Questions | freejavaguide.com

1. How do I indent the first line in my paragraphs?
This isn't really possible in a reliable way, until style sheets are more widely supported. At this moment, there are several browser-specific kludges and tricks available, but these are not guaranteed to work.

1) Use a number of   ( ) characters. Netscape and related browsers do not collapse these, like normal spaces, so this appears as an indent in these browsers. Other browsers can display it as one space.

2) Put a <DD> at the beginning of the line. This is syntactically invalid, but Netscape works around this by indenting the line at this ball. Of course, other browsers will handle this differently, and there is no guarantee that Netscape will keep doing this.

Extensible Markup Language XML Tutorial

The basic syntax for one element in XML is

<name attribute="value">content</name>

Here is an example of a simple recipe expressed using XML:

<?xml version="1.0" encoding="UTF-8"?>
<recipe name="bread" prep_time="5 mins" cook_time="3 hours">
<title>Basic bread</title>
<ingredient amount="3" unit="cups">Flour</ingredient>
<ingredient amount="0.25" unit="ounce">Yeast</ingredient>
<ingredient amount="1.5" unit="cups" state="warm">Water</ingredient>
<ingredient amount="1" unit="teaspoon">Salt</ingredient>
<instructions>
<step>Mix all ingredients together, and knead thoroughly.</step>
<step>Cover with a cloth, and leave for one hour in warm room.</step>
<step>Knead again, place in a tin, and then bake in the oven.</step>
</instructions>
</recipe>

Core Java - Interview Questions and Answers

1. What is the most important feature of Java?
Java is a platform independent language.
2. What do you mean by platform independence?
Platform independence means that we can write and compile the java code in one platform (eg Windows) and can execute the class in any other supported platform eg (Linux,Solaris,etc).
3. What is a JVM?
JVM is Java Virtual Machine which is a run time environment for the compiled java class files.
4. Are JVM's platform independent?
JVM's are not platform independent. JVM's are platform specific run time implementation provided by the vendor.
5. What is the difference between a JDK and a JVM?
JDK is Java Development Kit which is for development purpose and it includes execution environment also. But JVM is purely a run time environment and hence you will not be able to compile your source files using a JVM.
6. What is a pointer and does Java support pointers?
Pointer is a reference handle to a memory location. Improper handling of pointers leads to memory leaks and reliability issues hence Java doesn't support the usage of pointers.

Wednesday, September 18, 2013

Personal interview questions and answers

What was your biggest mistake?


There’s nothing wrong in admitting a mistake. A human being is bound to commit mistakes. This time it is advantageous to go back as far as possible in the past and find an answer.

The advantage of doing this is that a youngster is expected to commit more mistakes than a mature and seasoned person. This would give an impression that since that time you have committed mistakes but not that big.

Take the word “mistake” as liberally as possible and go back to your student life to answer this question. Probably you can say, if I could go back to my student life, I would have studied Biology instead of Math.

Monday, September 16, 2013

Interview Question & Answer: Discussing salary and salary expectations

  1. Tell me about yourself?
  2. What is your current job?
  3. What are your responsibilities in your current job?
  4. Why do you want this job?
  5. Why do you think that you would be the best candidate for this job?
  6. What is the most important thing for you in a job?
  7. What is your greatest strength?
  8. What are your greatest weaknesses?
  9. What do you know about this company?
  10. Why should we hire you?

Top 20 Interview Questions Wid Answers

1) Tell me something about yourself?

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.
OR
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 the job.

2) What do you seek from a job?

I would like a job which gives me a chance to apply all that I have learned in college as well as one which enables me to grow as a professional. I would like a role which enables me to make a difference.
OR
Great learning opportunities, challenging roles, rational career progression, good job satisfaction and opportunities to use my strength organization that gives me the opportunity to serve the organization and the society.

Wednesday, September 11, 2013

Sun Java Certification SCJP

2. Importing packages doesn't recursively import sub-packages.

3. Sub-packages are really different packages, happen to live within an enclosing package. Classes in sub-packages cannot access classes in enclosing package with default access.

4. Comments can appear anywhere. Can't be nested. No matter what type of comments.

5. At most one public class definition per file. This class name should match the file name. If there are more than one public class definitions, compiler will accept the class with the file's name and give an error at the line where the other class is defined.

Java Interview Questions

1. What is the difference between private, protected, and public?

These keywords are for allowing privileges to components such as java methods and variables.
Public: accessible to all classes
Private: accessible only to the class to which they belong
Protected: accessible to the class to which they belong and any subclasses.
Access specifiers are keywords that determines the type of access to the member of a class. These are:
* Public
* Protected
* Private
* Defaults

Monday, September 9, 2013

Latest JavaScript Interview Questions and Answers PDF

1) What is JavaScript?
Ans:JavaScript is a scripting language most often used for client-side web development.
2) What is the difference between JavaScript and Jscript?
Ans:Both JavaScript and Jscript are almost similar. JavaScript was developed by Netscape. Microsoft reverse engineered Javascript and called it JScript.
3) How do we add JavaScript onto a web page?
Ans:There are several way for adding JavaScript on a web page, but there are two ways which are commonly used by developers
If your script code is very short and only for single page, then following ways are the best:
a) You can place <script type="text/javascript"> tag inside the <head> element.

Interview Questions and Answers for Freshers

The interviews are much important to check the ability of the candidate giving the interview to the interviewer and also stressful for the job seekers even they have gone to the number of interviews. To reduce the stress there is a better way and that is to be prepared for the questions that can be normally asked by an interviewer.

MBA calling: How to prepare for the personal interview

Q.  Tell me some thing about yourself.This is how most interviews begin and this is one question you cannot afford to be unprepared for.
To frame a good answer it is always helpful to know what is it that the interviewer wants to know about you. An interviewer would like to know.
~ Your educational background~ Your work experience, if any~ Your strengths and achievements
~ About your family background
~ About where you are coming from academically, professionally
You should be short and crisp about all the points mentioned above. If the interviewer needs an elaboration s/he will ask you.

Friday, September 6, 2013

JavaScript interview questions and answers

  1. What’s relationship between JavaScript and ECMAScript? - ECMAScript is yet another name for JavaScript (other names include LiveScript). The current JavaScript that you see supported in browsers is ECMAScript revision 3.
  2. What are JavaScript types? - Number, String, Boolean, Function, Object, Null, Undefined.
  3. How do you convert numbers between different bases in JavaScript? - Use the parseInt() function, that takes a string as the first parameter, and the base as a second parameter. So to convert hexadecimal 3F to decimal, use parseInt ("3F", 16);
  4. What does isNaN function do? - Return true if the argument is not a number.
  5. What is negative infinity? - It’s a number in JavaScript, derived by dividing negative number by zero.
  6. What boolean operators does JavaScript support? - &&, || and !
  7. What does "1"+2+4 evaluate to? - Since 1 is a string, everything is a string, so the result is 124.
  8. How about 2+5+"8"? - Since 2 and 5 are integers, this is number arithmetic, since 8 is a string, it’s concatenation, so 78 is the result.
  9. What looping structures are there in JavaScript? - for, while, do-while loops, but no foreach.
  10. How do you create a new object in JavaScript? - var obj = new Object(); or var obj = {};
  11. How do you assign object properties? - obj["age"] = 17 or obj.age = 17.
  12. What’s a way to append a value to an array? - arr[arr.length] = value;
  13. What is this keyword? - It refers to the current object.

C++ Interview questions and answers

  1. How do you decide which integer type to use?
  2. What should the 64-bit integer type on new, 64-bit machines be?
  3. What’s the best way to declare and define global variables?
  4. What does extern mean in a function declaration?
  5. What’s the auto keyword good for?
  6. I can’t seem to define a linked list node which contains a pointer to itself.
  7. How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
  8. How can I declare a function that returns a pointer to a function of its own type?
  9. My compiler is complaining about an invalid redeclaration of a function, but I only define it once and call it once. What’s happening?
  10. What can I safely assume about the initial values of variables which are not explicitly initialized?
  11. Why can’t I initialize a local array with a string?
  12. What is the difference between char a[] = “string”; and char *p = “string”; ?
  13. How do I initialize a pointer to a function?

QTP interview questions and answers

  1. What are the Features & Benefits of Quick Test Pro (QTP 8.0)? - Operates stand-alone, or integrated into Mercury Business Process Testing and Mercury Quality Center. Introduces next-generation zero-configuration Keyword Driven testing technology in Quick Test Professional 8.0 allowing for fast test creation, easier maintenance, and more powerful data-driving capability. Identifies objects with Unique Smart Object Recognition, even if they change from build to build, enabling reliable unattended script execution. Collapses test documentation and test creation to a single step with Auto-documentation technology. Enables thorough validation of applications through a full complement of checkpoints.

C# interview questions and answers

  1. What’s the advantage of using System.Text.StringBuilder over System.String? StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it’s being operated on, a new instance is created.
  2. Can you store multiple data types in System.Array? No.
  3. What’s the difference between the System.Array.CopyTo() and System.Array.Clone()? The first one performs a deep copy of the array, the second one is shallow.
  4. How can you sort the elements of the array in descending order? By calling Sort() and then Reverse() methods.

J2EE interview questions and answers

  1. What makes J2EE suitable for distributed multitiered Applications?
    - The J2EE platform uses a multitiered distributed application model. Application logic is divided into components according to function, and the various application components that make up a J2EE application are installed on different machines depending on the tier in the multitiered J2EE environment to which the application component belongs. The J2EE application parts are:
    • Client-tier components run on the client machine.

Java interview questions and answers

  1. What is garbage collection? What is the process that is responsible for doing that in java? - Reclaiming the unused memory by the invalid objects. Garbage collector is responsible for this process
  2. What kind of thread is the Garbage collector thread? - It is a daemon thread.

  3. What is a daemon thread? - These are the threads which can run without user intervention. The JVM can exit when there are daemon thread by killing them abruptly.
  4. How will you invoke any external process in Java? - Runtime.getRuntime().exec(….)
  5. What is the finalize method do? - Before the invalid objects get garbage collected, the JVM give the user a chance to clean up some resources before it got garbage collected.
  6. What is mutable object and immutable object? - If a object value is changeable then we can call it as Mutable object. (Ex., StringBuffer, …) If you are not allowed to change the value of an object, it is immutable object. (Ex., String, Integer, Float, …)
  7. What is the basic difference between string and stringbuffer object? - String is an immutable object. StringBuffer is a mutable object.
  8. What is the purpose of Void class? - The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the primitive Java type void.
  9. What is reflection? - Reflection allows programmatic access to information about the fields, methods and constructors of loaded classes, and the use reflected fields, methods, and constructors to operate on their underlying counterparts on objects, within security restrictions.
  10. What is the base class for Error and Exception? - Throwable
  11. What is the byte range? -128 to 127
  12. What is the implementation of destroy method in java.. is it native or java code? - This method is not implemented.
  13. What is a package? - To group set of classes into a single unit is known as packaging. Packages provides wide namespace ability.
  14. What are the approaches that you will follow for making a program very efficient? - By avoiding too much of static methods avoiding the excessive and unnecessary use of synchronized methods Selection of related classes based on the application (meaning synchronized classes for multiuser and non-synchronized classes for single user) Usage of appropriate design patterns Using cache methodologies for remote invocations Avoiding creation of variables within a loop and lot more.
  15. What is a DatabaseMetaData? - Comprehensive information about the database as a whole.
  16. What is Locale? - A Locale object represents a specific geographical, political, or cultural region
  17. How will you load a specific locale? - Using ResourceBundle.getBundle(…);
  18. What is JIT and its use? - Really, just a very fast compiler… In this incarnation, pretty much a one-pass compiler — no offline computations. So you can’t look at the whole method, rank the expressions according to which ones are re-used the most, and then generate code. In theory terms, it’s an on-line problem.
  19. Is JVM a compiler or an interpreter? - Interpreter
  20. When you think about optimization, what is the best way to findout the time/memory consuming process? - Using profiler
  21. What is the purpose of assert keyword used in JDK1.4.x? - In order to validate certain expressions. It effectively replaces the if block and automatically throws the AssertionError on failure. This keyword should be used for the critical arguments. Meaning, without that the method does nothing.
  22. How will you get the platform dependent values like line separator, path separator, etc., ? - Using Sytem.getProperty(…) (line.separator, path.separator, …)
  23. What is skeleton and stub? what is the purpose of those? - Stub is a client side representation of the server, which takes care of communicating with the remote server. Skeleton is the server side representation. But that is no more in use… it is deprecated long before in JDK.
  24. What is the final keyword denotes? - final keyword denotes that it is the final implementation for that method or variable or class. You can’t override that method/variable/class any more.
  25. What is the significance of ListIterator? - You can iterate back and forth.
  26. What is the major difference between LinkedList and ArrayList? - LinkedList are meant for sequential accessing. ArrayList are meant for random accessing.
  27. What is nested class? - If all the methods of a inner class is static then it is a nested class.
  28. What is inner class? - If the methods of the inner class can only be accessed via the instance of the inner class, then it is called inner class.
  29. What is composition? - Holding the reference of the other class within some other class is known as composition.