answersLogoWhite

0

📱

Java Programming

The Java programming language was released in 1995 as a core component of the Java platform of Sun Microsystems. It is a general-purpose, class-based, object-oriented language that is widely used in application software and web applications.

5,203 Questions

Why i cant download java on your xbox360?

Java is not a part of the XBox 360 software, so while you could conceptually download Java, the XBox 360 lacks the necessary software to run such an application.

What is the Practical application of a derived class object stored in base class pointer?

If you have base class derived object pointing by base class pointer, then you have the power of run time polymorphism in your hand, which gives you the ability to call the derived class implementation of the virtual member function. If we declare the member function as virtual in base class which needs to overridden in derived class, then you can decide at run time which implementation will be called at run time.

What is meant by data abstraction An example that would be used in a program?

Data abstraction simply describes the difference between an object's concrete implementation and its abstract interface. Clients do not need to know how an object works in order to use it, they only need to know what it does. As a real world example, a user does not need to understand how electrical energy can be transformed into light energy, they only need to know that flicking a switch will turn the light on and off. That is, the switch provides the interface; everything the user needs to know in order to use the light. The implementation details are not important to the user.

In a computer program, we use data abstraction in order to simplify an object's physical representation, exposing only what we need to expose (no more and no less) through an abstract interface whilst keeping the actual implementation details safely tucked away.

As an example, a variable-length array requires at least three pieces of information: the start address of the array, the number of used elements in the array and the number of unused elements in the array. When the programmer wants to add a new element, they must first check to see if there are any unused elements. If not, the array must be reallocated with a new reserve. Then the programmer can add the new element, increment the used element count and decrement the unused element count. And they must do that every time they add a new element.

But these implementation details are not important to the programmer; they simply want to add a new element. The array itself should be responsible for the underlying implementation, not the programmer. And that's where data abstraction comes in. In object oriented programming we use vectors rather than variable length arrays. They both do exactly the same job equally efficiently, but vectors are much easier to work with. The programmer can concentrate on actually using the object rather than concerning themselves with the mundane, repetitive and error-prone activities related to the object's underlying memory management. Those implementation details are safely abstracted away behind the object's interface.

What is Disadvantage of c programming?

Although C is a high-level language, the level of abstraction is extremely low to the extent that the onus of responsibility lies largely with the programmer rather than with the language. C++ now fulfils many of the roles previously filled by C.

What is the definition of piping class?

Pipe class is a collection of most compatible components considering dimensional and material properties for the intended service over a range on pressure and temperature specified.

What is a 'source language'?

A source language is the original language in an interpretation. For example, if I speak a phrase in English and it is translated into Spanish, the Source language is English. The target language is Spanish.

Character use only one byte why Java use two byte for character?

The number of bytes used by a character varies from language to language. Java uses a 16-bit (two-byte) character so that it can represent many non-Latin characters in the Unicode character set.

What is Install Developer?

What is Install Developer?

which are tools they install?

where it is use?

How to set java for openGL?

Java has no native support for OpenGL. While there are some third-party attempts, I have yet to hear of one which completely implements OpenGL.

Can an object have several different classes?

Inheriting multiple base classes is not allowed in Java. If you are curious asking me why doesn't java allow multiple inheritance, think about this scenario. Let us say the Automobile Class has a drive() method and the Car class has a drive() method and the Ferrari class has a drive() method too. Let us say you create a new class FerrariF12011 that looks like below:

Public class FerrariF12011 extends Ferrari, Car, Automobile {…}

And at some point of time you need to call the drive() method, what would happen? Your JVM wouldn't know which method to invoke and you may have to instantiate one of the classes that you already inherit in order to call its appropriate method. Sounds confusing right? To avoid this nonsense is why the creators of java did not include this direct multiple inheritance feature.

What are the key points you need to remember about switch case statements?

Switch case statement:

  • The switch case statement is a better way of handling multiple choices, it is similar to 'if-else statement' and is a better way of controlling branching behavior in a program.
  • Switch statement tests whether an expression matches one of the case.
  • Each case is labeled by one or more integer constant expressions. If a case matches the expression value, execution starts at that case.
  • Default case is also present which is optional and it is executed only if none of the other cases are satisfied.
  • Each case is terminated by break statement which causes immediate exit from the switch statement
  • If you miss the break statement in one of the Switch conditions, all the subsequent conditions may also get executed

Why in function overloading name of function is same?

If the function names were not the same then they would not be overloads they'd just be ordinary functions. In reality, there is nothing special about overloads; they are treated just as if they had completely unique names. The compiler uses the name of a function in conjunction with the number and type of arguments passed to it by the caller to determine which function to actually call, whether the function is an overload or not. If no matching signature can be found, or there are two or more overloaded functions with the same signature, the compiler will alert you to the ambiguity. Note that the return type is not considered part of the function signature, hence overloads cannot differ by return type alone. If you need the same signature but a different return type, then you cannot use an overload, you must use a different function name in order to differentiate them.

The reason we use overloads rather than separate function names is merely one of convenience. If overloads were not permitted, then we'd be forced to use unique names for every function, even if the implementations were exactly the same and the only difference was in the type of argument being passed. That, in turn, would mean we could not use template functions (which allow the compiler to generate overloads for us), and we'd then be forced to write and maintain duplicate code ourselves.

What is an arrey and how many types of arrey in details?

An array is a data type that describes a collection of ordered variables and types of arrays include vector arrays and matrix arrays.

When the byte codes in a class file are invalid which one of the following must detect it?

When you have bytecode, the program is already compiled; so it would be the JVM which detects that.

What makes a java method code thread-safe?

The cleanest way to make a method thread-safe is add to the method declaration the synchronized keyword, like this:

public class MyClass{
// More code here

public synchronized void safeMethod(){
//Do something here, now is safe
}

}

The above code is the same as:

public class MyClass{
// More code here

public void safeMethod(){
synchronized (this){
//Do something here, now is safe
}
}

}

Why is main of java declared as static?

Probably because there is no need, or use, to create several objects based on the main class.

When was A Box Full of Sharp Objects created?

A Box Full of Sharp Objects was created in 2002.

What type of crop fields depend on migrant farmworkers?

a list of some are: raspberries, strawberries, blueberries, apples, cherries, potatoes, or anything that needs to be picked by hand, or sorted by hand

In southwest Louisiana they are used in the sugarcane and crawfish fields.

How do you program a reverse auto loan calculator in JAVA?

In order to program a reverse auto loan calculator in JAVA, you are going to need a lot of experience with JAVA. There are online tutorials that can help you set up with fundamentals of JAVA so that you will be able to create almost any basic program you want.