Difference between inheritance and polymorphism, JAVA Programming

Assignment Help:

Question 1:

a) What is the meaning of an object-oriented programming?

b) List eight simple types of data in Java

c) Explain how objects and classes are closely related.

d) Give three characteristics of a class and three characteristics of an object.

e) What is the difference between a compiler and an interpreter?

f) State two differences between a variable and an object.

Question 2:

a) Briefly explain the "Conditional Statement", with an example.

b) Describe what an array is and what is its importance?

c) What is a void method?

d) Briefly describe the difference between "Inheritance" and "Polymorphism".

e) Examine the following program and write down the output.
public class Exam
{ public static void main (String [ ]args )
{ String alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
System.out.println (alphabet);
System.out.println ("This string contains" + alphabet.length ( ) + "characters.");
System.out.println ("The character at index 4 is" + alphabet.charAt (4));
System.out.println ("The index of the character Z is" + alphabet.indexOf(‘Z'));
}
}


Related Discussions:- Difference between inheritance and polymorphism

What are the difference between throw and throws, What are the difference b...

What are the difference between throw and throws? Differences are between throws and throw are: Throw is employed to trigger an exception while throws is used in declara

What is the comparable interface, What is the Comparable interface? Com...

What is the Comparable interface? Comparable interface is used to sort arrays and collections of objects using collections.sort() and java.utils. Objects of the class implement

Uses of fileinputstream and fileoutputstream, Java Programming 1. Write...

Java Programming 1. Write a program in Java to find the highest of any five numbers. How do you compile and execute this Java program? 2. Write a program to explain the Exce

Need to develop web server, Project Description: I wish to prepare a Web...

Project Description: I wish to prepare a Web server which provides subsequent Web Services. 1. User login 2. User input data store to server 3. User fetches results fro

Neatbeens and glass fish, Assignment 3 Project Proposal Documentation Descr...

Assignment 3 Project Proposal Documentation Description Marks out of Wtg(%) Due date Assignment 3 100 35% 15/09/14 In the assignment we will start analysing and designing the

How to use dispatchaction, To use the DispatchAction, follow these steps: ...

To use the DispatchAction, follow these steps: ? Make a class that extends DispatchAction (instead of Action) ? In a new class, add a method for each function you need to per

How does an exception permeate through the code, How does an exception perm...

How does an exception permeate through the code? An unhandled exception moves up the method stack in search of a matching When an exception is thrown from a code which is wrapp

A service locator, J2EE prepares use of the JNDI interface to access differ...

J2EE prepares use of the JNDI interface to access different resources like JMS, JDBC, EJB etc. The client finds up for these resources through the JNDI look-up. The JNDI look like

What is a framework, A framework is made up of the set of classes which per...

A framework is made up of the set of classes which permit us to use a library in a best possible way for a particular requirement.

Write a cgi program, Write a CGI program in R, accessible through the class...

Write a CGI program in R, accessible through the class web server, that performs an analysis or creates a graph. You can provide a separate HTML page that displays the initial form

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd