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

Write a java program to identify a duplicate value in a vector?

boolean containsDuplicate(final Vector v) {

// Iterate through each element in v...

for (int i = 1; i < v.size(); ++i) {

// For each element, check to see if there's a duplicate...

for (int j = 0; j < i; ++j) {

// If so, return true

if (v.get(i).equals(v.get(j))) {

return true;

}

}

}

// If we get here, then we have found no duplicates - return false

return false;

}

In java is A string the same thing as a char?

No.

A char is a single Unicode character. It is stored as a primitive (i.e., non-object) data. A string can be considered as an array of chars - Java stores it as an object.

No.

A char is a single Unicode character. It is stored as a primitive (i.e., non-object) data. A string can be considered as an array of chars - Java stores it as an object.

No.

A char is a single Unicode character. It is stored as a primitive (i.e., non-object) data. A string can be considered as an array of chars - Java stores it as an object.

No.

A char is a single Unicode character. It is stored as a primitive (i.e., non-object) data. A string can be considered as an array of chars - Java stores it as an object.

Why you need convert a expression into postfix expression?

You convert an (infix) expression into a postfix expression as part of the process of generating code to evaluate that expression.

What is util in java?

I am assuming that you are talking about the java.util package.

java.util is a non-extension package that shipped from Java 1. It has many utilities classes that are frequently used in Java programming. For example, the Collections framework is in it, along with all of the legacy collection classes (viz. Hashtable and Vector). It has the event model, date and time facilities, and il8n (internationalization; it's a long word, hence the abbreviation). It also has some miscellaneous utility classes, such as Properties, Observer/Observable, Random, Scanner, Enumeration/Iterator, and others.

Why does your peugeot 607 have a front end wobble?

could need a tire balancing. Also check the tires to see if you dont have a bubble on one of them

What is a loop reactor?

A bulk (slurry) polymerisation reactor which is made of a closed long tube through which the slurry is circulated. Loop reactors are characterised by a very narrow residence time distribution, leading to uniform product characteristics.

What is the similar property between dynamic programming and greedy approach?

Both are using Optimal substructure , that is if an optimal solution to the problem contains optimal solutions to the sub-problems

What is synchrronized keyword used for?

The synchronized keyword is one of the most important keywords that you may use while using Threads

This will ensure that a particular object is accessed by only one thread at any given time

What is orthogonality in a programming language?

In computer programming, orthogonality in a programming language means that a relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structures of the language. The term is most-frequently used regarding assembly instruction sets, as orthogonal instruction set.

Which programming language used by yahoo?

Probably a multitude of things, just what fits the job. For instance, they can use C++ for their core applications, and Java for the layers around the core.

Why is everything about him?

Because most men are like that. They think that since there men in the relationship we should we everything they say and if you don't they like to get mad and fight with you intill you do. That's when you have to fight back and let them know that it takes two to be in a relationship and that we both have say so and we have to listen to each other

How and why are variable names used in programming to process data?

Variable names are used so the code is readable. When the code is compiled to machine languages, it no longer uses the variable names to understand it's operations...sometimes variable names are kept as metadata to help debug but the computer does not need them to execute the program...they are for us so we can easily understand what we are doing.

What is the function of default values in java?

Default values are available for any class or instance variable. If you do not specify a value for a class or instance variable the JVM will provide a default value that will ensure that the system does not end up with any unexpected errors because you used a variable that was not initialized.

Ex:

Public class Test {

int I;

}

In the above class we have just declared an instance variable called 'I' but we haven't associated any value to it. The JVM automatically assigns 0 as the default value to this variable.

What is Aperio in Java?

Aperio is a web-based knowledge automation solution. Aperio provides information analysis, querying, reporting, and distribution capabilities from within a standard browser. Aperio is Java-based, and leverages existing corporate environments. Designed for the large-scale corporate environment, Aperio scales to thousands of users, provides a high level of security, and supports the Windows NT and Unix platforms, and all primary database systems.

What pseudo-random block stream is generated by 64-bit OFB with a weak DES key?

With (OFB) output feed back, a random 64-bit number, known as the IV is encrypted with the weak secret key to create the one-time pad. A weak DES secret key is one which is either all 1's, 0's or alternating ones and zeros. The plain text is XOred with as many bits of the generated one-time pad. If a weak key patterns will emerge in the ciphertext. - Eric Appelboom

A cross platform application program is one that?

Can be run on any platform or operating system. Ex: Java

Is it true that class variables can be assessed without creating an object of the class?

Yes, if the variable is static. When a variable is static, is associated with the class itself and not any particular object (though it can be accessed through an object as well). An example is shown below:

class A

{

static int k = 5;

}

...

System.out.println(A.k);//5

Why recursive algorithm for Fibonacci series is inefficient?

Because the same calculations are done over and over again. Fib(n) - the nth. number in the sequence - is equal to fib(n-1) + fib(n-2). For example, fib(10) - the 10th. number in the sequence - is equal to fib(9) + fib(8). If you expand this, you get fib(8) + fib(7) + fib(7) + fib(6). If you expand again, you get fib(7) + fib(6) + fib(6) + fib(5) + fib(6) + fib(5) + fib(5) + fib(4). You can already see that some of the numbers have to be evaluated several times. In fact, the amount of calculations increases exponentially; whereas with a simple loop, to add numbers up to fib(n), this is not the case.

Can you store unlimited value in any integer type of variables?

No. In Java, you can store a limited range of values in an integer. Specifically, integers are 32-bit signed values which can store values in the range [-231, 231-1]. If you need to store more values, consider using a long integer [-263, 263-1] or the BigInteger class (which can store arbitrary-precision values).

What is the use of trim in java?

trim() is said to be used to remove the trail spaces . But for an instance if u have an int like 5660 how would u trim it