Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.What is the output of the following java code? String A = SCIENCE; System.out.println (A.substring (3, 5)); a.SCIE b.EN c.ENCE d.SC 2.Analysis the following class

1.What is the output of the following java code?

String A = SCIENCE; System.out.println (A.substring (3, 5));

a.SCIE

b.EN

c.ENCE

d.SC

2.Analysis the following class definition and answer the following question.

class Test{

double mark;

void setMark (double m){

mark = m; }

private double calTotal(){

return mark * 0.5; }

void display(){

System.out.println(mark);

}}

.

What is data type of member variable?

a.No data type

b.public

c.double

d.void

3.Any entity that has properties and behavior is known as ______________

a.Program

b.Source

c.JVM

d.Object

4.Which is the correct format to declare one dimensional array to store 4 integer numbers in Java?

a.int n = new[4];

b.int n;

c.int[] n = new int[4];

d.int[4] n;

5_______ class can be used for user input in Java.

a.Scanner

b.io

c.Utility

d.method

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

More Books

Students also viewed these Databases questions