The @Override annotation can be added to the javadoc for the new method. If you accidently miss an argument or capitalize the method name wrong, the compiler will generate a compile-time error.
Showing posts with label 85 Most Important Javascript Interview Questions. Show all posts
Showing posts with label 85 Most Important Javascript Interview Questions. Show all posts
Is it possible to override the main method?
Posted in: 85 Most Important Javascript Interview Questions,Thread Pool
NO, because main is a static method. A static method can't be overridden in Java.
What are the differences between method overloading and method overriding?
Posted in: 85 Most Important Javascript Interview Questions,Polymorphism in Java
| Overloaded Method | Overridden Method | |
|---|---|---|
| Arguments | Must change | Must not change |
| Return type | Can change | Can’t change except for covariant returns |
| Exceptions | Can change | Can reduce or eliminate. Must not throw new or broader checked exceptions |
| Access | Can change | Must not make more restrictive (can be less restrictive) |
| Invocation | Reference type determines which overloaded version is selected. Happens at compile time. | Object type determines which method is selected. Happens at runtime. |
How does Java implement polymorphism?
Posted in: 10 Tricky Java Interview Questions,15 Most Java Interview Questions for Experienced professionals.,85 Most Important Javascript Interview Questions
Inheritance, Overloading and Overriding are used to achieve Polymorphism in java. Polymorphism manifests itself in Java in the form of multiple methods having the same name.
- In some cases, multiple methods have the same name, but different formal argument lists (overloaded methods).
- In other cases, multiple methods have the same name, same return type, and same formal argument list (overridden methods).
What is Polymorphism?
Posted in: 15 Most Java Interview Questions for Experienced professionals.,85 Most Important Javascript Interview Questions,core java concepts ppt,FAQ's
Polymorphism is an important Object oriented concept and widely used in Java and other programming language. Polymorphism in java is supported along with other concept like abstraction, encapsulation and inheritance. bit on historical side polymorphism word comes from ancient Greek where poly means many so polymorphic are something which can take many form. In this java polymorphism tutorial we will see what polymorphism in Java is, how polymorphism is implemented in Java, why should we use polymorphism and how can we take advantage of polymorphism while writing code in Java. Along the way we will also see a real world example of using polymorphism in Java.
What is meant by Inheritance?
Posted in: 10 Tricky Java Interview Questions,85 Most Important Javascript Interview Questions
Definition 1:
Java Inheritance defines an is-a relationship between a superclass and its subclasses. This means that an object of a subclass can be used wherever an object of the superclass can be used. Class Inheritance in java mechanism is used to build new classes from existing classes.
Definition 2:
Inheritance means to acquire property of others. It also means that we can use code of other functions and methods. Means Code reusability. In this object are defines by classes that are super class and which classes uses property of that class is known as sub class. It is very useful in Object Oriented Languages.
base class
Base class is the most generalised class in a class structure. Most applications have such root classes. In Java, Object is the base class for all classes.
superclass
Superclass is a class from which another class inherits.
Java Inheritance defines an is-a relationship between a superclass and its subclasses. This means that an object of a subclass can be used wherever an object of the superclass can be used. Class Inheritance in java mechanism is used to build new classes from existing classes.
Definition 2:
Inheritance means to acquire property of others. It also means that we can use code of other functions and methods. Means Code reusability. In this object are defines by classes that are super class and which classes uses property of that class is known as sub class. It is very useful in Object Oriented Languages.
base class
Base class is the most generalised class in a class structure. Most applications have such root classes. In Java, Object is the base class for all classes.
superclass
Superclass is a class from which another class inherits.
Top Java Interview Questions
Posted in: 10 Tricky Java Interview Questions,15 Most Java Interview Questions for Experienced professionals.,85 Most Important Javascript Interview Questions,FAQ's
- What is Java Runtime Environment (JRE) ?
- When you will use Abstract Class or Interface?
- How do I parse a comma delimited string?
- Why java does not support pointers?
- How do I read a text/data file into an array?
- Why do I keep getting a "java.lang.NullPointerException" when using arrays?
- What is Connection Pooling?
- What is weak reference in Java?
- When is the ArrayStoreException thrown?
- What is object cloning?
- What is the difference between final, finally and finalize?
- What is a transient variable?
- Can you call one constructor from another if a class has multiple constructors?
- What are wrapper classes?
- Is JVM a compiler or an interpreter?
- What is the difference between yield() and sleep()?
- Tell me the scenario like When to use Arraylist and Vector ?
- What is serialization ?
- What is Use of Marker interfaces in Java?
- Difference between the Super() and this() ?
You might also like this
- Collections API
- JSP Interview Questions and Answers
- Java Interview Questions with Answers
- Java Serialization
- Purpose of the serialVersionUID in Java
- HR Interview Questions with Answers
- Core Java FAQ's
Please share your faced interview questions by faqs@javastuff.in, which can help job seekers as well as java learners.
MindTree Java Interview Questions
Posted in: 10 Tricky Java Interview Questions,15 Most Java Interview Questions for Experienced professionals.,85 Most Important Javascript Interview Questions,Core Java,FAQ's
- How does garbage collection work?
- How do you create a thread dump?
- How do you profile an application?
- What's new and/or up and coming in the industry?
- How to make a collection or map immutable without using any existing features?
- What frameworks would you use to develop your dream application?
- What are the main benefits of using Spring on a project ?
- What is AOP ?
- How hibernate implements lazy loading ?
- What is the second level cache in Hibernate ?
- What are the main new features of Java5 ? Same question with Java6 ?
- Difference between Set, Map and List.
- Importance of hashcode and equals. When to implement what?
- Difference between immutable and final.
Please share your faced interview questions by faqs@javastuff.in, which can help job seekers as well as java learners.
85 Most Important Javascript Interview Questions
Posted in: 85 Most Important Javascript Interview Questions
- What is JavaScript?
- How is JavaScript different from Java?
- What is relationship between JavaScript and ECMAScript?
- How do you submit a form using Javascript?
- How do we get JavaScript onto a web page?
- How to detect the operating system on the client machine?
- How to read and write a file using javascript?
- How can JavaScript make a Web site easier to use? That is, are there certain JavaScript techniques that make it easier for people to use a Web site?
- How can JavaScript be used to improve the "look and feel" of a Web site?
- How can JavaScript be used to improve the user interface?
- What are JavaScript types?
- How to create arrays in JavaScript?
- How do you convert numbers between different bases in JavaScript?
- What is a fixed-width table and its advantages?
- Where are cookies actually stored on the hard disk?
- How do you target a specific frame from a hyperlink?
- What can javascript programs do?
- How to set a HTML document's background color?
- How to add Buttons in JavaScript?
- Are you concerned that older browsers do not support JavaScript and thus exclude a set of Web users? individual users?
- What is the data type of variables of in JavaScript?
- What is negative infinity?
- In a pop-up browser window, how do you refer to the main browser window that opened it?
- What does isNaN function do?
- What Boolean operators does JavaScript support?
- What and where are the best JavaScript resources on the Web?
- How to write a script for "Select" lists using javascript
- What does the "Access is Denied" IE error mean?
- Is a javascript script faster than an ASP script?
- How to embed javascript in a web page?
- Are Java and JavaScript the Same?
- What are the problems associated with using JavaScript, and are there JavaScript techniques that you discourage?
- What does "1"+2+4 evaluate to?
- What does the EnableViewStateMac setting in an aspx page do?
- What is the difference between SessionState and ViewState?
- Taking a developer’s perspective, do you think that that JavaScript is easy to learn and use?
- What is a prompt box?
- What is the difference between an alert box and a confirmation box?
- Can javascript code be broken in different lines?
- What looping structures are there in JavaScript?
- How to hide javascript code from old browsers that dont run it?
- How to Accessing Elements using javascript?
- How to comment javascript code?
- What does javascript null mean?
- Name the numeric constants representing max,min values
- What’s a way to append a value to an array?
- How do you assign object properties?
- To set all checkboxes to true using JavaScript?
- How to select an element by id and swapping an image?
- What does the term sticky session mean in a web-farm scenario? Why would you use a sticky session? What is the potential disadvantage of using a sticky session?
- What is === operator?
- Does javascript have the concept level scope?
- What are undefined and undeclared variables?
- What is variable typing in javascript?
- What is the difference between undefined value and null value?
- What does undefined value mean in javascript?
- How to disable an HTML object?
- How to Add new elements dynamically?
- To write messages to the screen without using "document.write()" ?
- How to find radio button selection when a form is submitted?
- How to find the selected radio button immediately using the 'this' variable?
- How to setting a cookie with the contents of a textbox?
- How to create a popup warning box?
- How to create a confirmation box?
- How to getting values from cookies to set widgets?
- How to change style on an element?
- How to Handle Event Handlers?
- How to remove the event listener: ?
- How to reload the current page?
- How to make elements invisible?
- how to force a page to go to another page using JavaScript?
- How to set the cursor to wait?
- How to convert a string to a number using JavaScript?
- How to test for bad numbers using JavaScript?
- How to convert numbers to strings using JavaScript?
- How to create Arrays using JavaScript?
- What does the delete operator do?
- How to delete an entry using JavaScript?
- How to use strings as array indexes using JavaScript?
- How to make a array as a stack using JavaScript?
- How to shift and unshift using JavaScript?
- How to create an object using JavaScript?
- How to associate functions with objects using JavaScript?
- What's Prototypes for JavaScript?
- How to create a function using function constructor?
