What do you understand by the term constructor in java, JAVA Programming

Assignment Help:

Question:

(a) What are the main differences between an object and a class? Illustrate with appropriate examples.

(b) Differentiate between a global variable and a local variable. You may use a simple Java program to illustrate your answer.

(c) What do you understand by the term ‘constructor' in Java? Explain your answer with an appropriate example.

(d) Declare and initialise an array of type float of size 5 to store the marks obtained by a student at his examinations. Initialise the array with the following values {65, 57, 75, 49, 88}.

Write the code fragments in Java to find:

(i) the average mark obtained by the student at the examinations.
(ii) the highest mark obtained by the student.
(iii) the lowest mark obtained.


Related Discussions:- What do you understand by the term constructor in java

Describe the edit phase- java program development, Describe the Edit phase-...

Describe the Edit phase- Java Program Development Phase comprises editing a file. This is done with an editor program. Programmer types a java program using editor such as no

Add wordpress color picker to plug-in text field, Add WordPress color picke...

Add WordPress color picker to plug-in text field Project Description: I have a simple plug-in that needs the built-in Word Press color picker added to one of the text input f

Constructors or destructors in java program, Consider the following Java de...

Consider the following Java definition of an integer list class. class IntegerList { private int[] list = new int[200]; private int size = 0; public boolean append(int value) {

Servlet pages from being cached by the browser, How do I prevent the output...

How do I prevent the output of my JSP or Servlet pages from being cached by the browser? Ans) You will require to set the appropriate HTTP header attributes to stop the dynamic

Authentication -security component, Authentication is basically an identifi...

Authentication is basically an identification step. Functionality used for J2EE security: Principal : An entity that may be authenticated and identified. Principal n

Problem, #questionSmugglers are becoming very smart day by day. Now they ha...

#questionSmugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they

How can we include images in a web page using html and java, How can we inc...

How can we include images in a web page using HTML and Java script?2011 Images in HTML It is quite straight forward to include gif and jpg images in an HTML webpage using the

What is javaserver faces expression language, A easy expression language us...

A easy expression language used by a JavaServer Faces UI component tag attributes to bind the associated component to a bean property or to bind the associated component's value to

How do i include static files within a jsp page, Static resources should al...

Static resources should always be contained using the JSP include directive. This way, the inclusion is performed just once during the translation phase. Do note that you should al

Explain the term- strings, Explain the term- Strings A string is genera...

Explain the term- Strings A string is generally considered to be a sequence of characters stored in memory and accessible as a unit. Strings in java are signified as objects

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