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

Is c plus plus and java are the same?

No. Java takes some ideas from C++, so there are certain similarities, especially in the basic syntax. But it is a different language.

Write a java programme to check whether the number is twin prime or not?

Find a prime number, add 2 to the number. Check if the new number is prime.

IE : 3 is prime. 3+2 =5. 5 is prime. (3,5) are twin primes.

How would you access data members of a class in cases inside member function of another class?

Either make the data members public, or make the member function a friend of the class containing the data member.

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.

What does the java new operator do?

The new keyword tells Java that you want to create a new instance of a class by invoking one of the constructors for that class.

// Create a new, empty String object

String s1 = new String();

// Create a new String object with a different constructor

String s2 = new String("howdy");

How do you change runtime on an AstroStart 1105?

press the key symbol and the lock symbol simultaneously for a couple secs. The parking lights flash once. Every time you press those two buttons the time increases.The increments are for 1 flash 2 minutes ,2 flashes 4 minutes , 3 flashes 8 miutes and then 4 flashes is 18 minutes. I finally found my manual

What is the return value when new operator is not able to allocate memory in c?

There is no operator new in C.

In C++11, there are three versions of operator new, all of which can be overridden. Default behaviour is as follows:

(1) throwing allocation

void* operator new (std::size_t size);

If an allocation of the given size cannot be met, an exception will be thrown. There is no return value after an exception is thrown.

(2) nothrow allocation

void* operator new (std::size_t size, const std::nothrow_t& nothrow_value) noexcept;

If an allocation of the given size cannot be met, nullptr is returned.

(3) placement

void* operator new (std::size_t size, void* ptr) noexcept;

Always returns ptr. You use this version when memory has already been allocated and you are merely providing placement for an object within that allocation.

Is a template for creating a set of objects having common characteristics and behaviour?

A Class. classes are the blueprint for construct objects with the same characteristics and behaviours.

What does primitive method mean in programming?

All the objects in Alice that have a set of common set of built-in methods for performing basic options.

Should the constructor name and class name be same?

Every class object is created using the same new keyword, so it must have information about the class to which it must create an object. For this reason, the constructor name should be the same as the class name.

To learn more about data science please visit- Learnbay.co

Java projects which does not use database?

JavaScript is a computer language that is mostly used in web browsers. An example of JavaScript project without a database is called a login session, this requires a lot of hard coding and requires a lot of multiple ID comparison.

What strings does Julian Bream use?

from his autobiography Julian states his preference for Augustine strings ,which are now called the traditional series.

What if you write static public void instead of public static void?

It would actually make no difference. The presence of the keywords during the declaration of the main method is important and not the order.

so a static public void main(String[] args) would just compile and run perfectly fine just like public static void main(String[] args)

Advantages and disadvantages of arrays in java?

Arrays permit efficient (constant time) random access but not efficient insertion and deletion of elements. Consequently, arrays are most appropriate for storing a fixed amount of data which will be accessed in an unpredictable fashion.

Another advantage of arrays that has become very important on modern architectures is that iterating through an array has good locality of reference, and so is much faster than iterating through (say) a linked list of the same size, which tends to jump around in memory. However, an array can also be accessed in a random way, as is done with large hash tables, and in this case this is not a benefit.

Arrays also are among the most compact data structures; storing 100 integers in an array takes only 100 times the space required to store an integer, plus perhaps a few bytes of overhead for the whole array. Any pointer-based data structure, on the other hand, must keep its pointers somewhere, and these occupy additional space. This extra space becomes more significant as the data elements become smaller. For example, an array of ASCII characters takes up one byte per character, while on a 32-bit platform, which has 4-byte pointers, a linked list requires at least five bytes per character. Conversely, for very large elements, the space difference becomes a negligible fraction of the total space.

Because arrays have a fixed size, there are some indexes which refer to invalid elements - for example, the index 17 in an array of size 5. What happens when a program attempts to refer to these varies from language to language and platform to platform.

What are the benefits of java for the development of e-commerce portals for customers and suppliers like partsEdge?

JAVA is excellent at security and transaction management, which are achieved by EJB (Enterprise Java Beans ).As EJB is only one distributed technology used for business processing of an organization efficiently. It is more faster as compared to other technologies.

Is sizeof keyword in Java?

sizeof is not a keyword in Java but many classes have size() or length() methods, which can mean the number of elements, characters, etc. depending on the class.

What types of values can be thrown in java?

Only instances of subclasses of throwable can be used in conjunction with the throw keyword. In java all exceptions and errors are subclasses of throwable.

What is the meaning of customer interface associates?

Customer interface associates are people that work directly with customers. The term refers to the fact that these associates serve as a go-between, or interface, for the company.

Program that accepts an input as a decimal number and converts it into a binary expression?

if you're using Java the Integer class has alot of methods that can easely convert to byte

for example:

int s;

Integer i = new Integer (s);

i.byteValue() // returns the same number but as a byte

i.toBinaryString(s) // returns the binary value as a string varibale

otherwise you can construct a loop that constructs a varaible using isOdd and finction ex :

public int binaryVariable (int i){

int m = 1; // increments with each variables

int n = 0; // varies between 0 and 1;

int a =0; // the outcoming number;

while (i>0){

if (isOdd (i)) n =1; // I'm afraid you have to make the isOdd function

else n = 0;

a +=n*m;

m*=10;

i/=2;

}

return a;

}

//hope this has helped

Java plant sap used as poison arrow?

One kind, upas antiar, is, derived from upas tree (Antiaris toxicaria) (member of breadfruit family). The more toxic is Upas tieute is prepared from a climbing plant (Strychnos Tieute). each contain antiarin, strychnine and strophanthin- causing paralysis, convlsion and cardiac arrest.

The Austronesians (which include the Malaysains, Phillippinos, Thai, Cambodian and Myanmarese as well as Indonesians) were feared widely for their mastery of poison arrows and darts- especially by the Chinese.

How do you determine symmetry of a data structure For example how do you know if a Stack or a queue or a priority queue or a double ended queue are symmetric?

You can determine symmetry of a data structure in two ways. One is when the stacks and queues data are put in the application and when the stacks are put in during run-time.