answersLogoWhite

0

education

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

Concatenation of string with number in java?

The concatenation can be done using the "+" operator. The output of this concatenation would be a String. Ex: public String concatenate(int val, String phrase) { return val + phrase; } If you invoke this method with 10 and years as the arguments the ouput would be 10 years.


What is the meaning of instantiate in java?

Instantiate means to create an actual instance of a Class. That is, the creation of an Object of that Class. This allocates memory on the heap for that object. Instantiate creates a unique object of that class, complete with its own copy of any class variables. Thing of a Class as a design spec, which, when instantiated, creates an actual thing of that type. For instance, imagine a set of blueprints detailing how a Ford Focus auto is to be manufactured. This is a Class. When those blueprints are manufactured (instantiated, in Java-speak), the result is a physically unique car. A class can be instantiated hundreds or thousands of times, but each instantiation creates a new and unique object, in the same way the Ford Focus blueprints can result in many individual cars. In essence, it happens whenever you call: new <ClassName>();


Wap to display string in the ascending order in java?

public class CreateDatabase{ public static void main(){ int a=10; int b=20; int result =a+b; System.out.println(result); } }


How do we declare enmurated data type?

Enumerated data types can be declared using the enum keyword followed by the name of the enumeration and a list of possible values enclosed in curly braces. Each value is separated by a comma. For example, enum Color { Red, Green, Blue } declares an enumeration named Color with three possible values: Red, Green, and Blue.


Is every class in java is subclass of itself?

A class can be a subclass of another class, not of itself.A class can be a subclass of another class, not of itself.A class can be a subclass of another class, not of itself.A class can be a subclass of another class, not of itself.