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

What is progeraming language?

A Language (ie.Java) That Deals with every command in a program

What is difference between for loop and do-while loop?

The do loop is similar to the forloop, except that the expression is not evaluated until after the do loop's code is executed. Therefore the code in a do loop is guaranteed to execute at least once. The following shows a do loop in action:

do {

System.out.println("Inside do while loop");

} while(false);

The System.out.println() statement will print once, even though the expression evaluates to false. Remember, the do loop will always run the code in the loop body at least once. Be sure to note the use of the semicolon at the end of the while expression.

How can access an interface from another interface and how to access from a class?

Interfaces are designed to do exactly that: to interface or to interact. In object-oriented programming languages such as C++, you can incorporate up to three different interfaces per class. The private interface is accessible only to the class itself and to friends of the class. The protected interface is the same as the private interface but is also accessible to derivatives of the class. The public interface is accessible to any code.

For one interface to interact with another interface, the first must have access to the second. If the first is a friend of the second or both are members of the same class, the first has unrestricted access to the private, protected and public interfaces of the second. If the first is derived from the second but is not a friend, the first only has access to the protected and public interfaces of the second. If the first is completely separate from the second, the first only has access to the public interfaces of the second.

What is the J2EE Value Object Pattern?

The Value Object pattern provides the best way to exchange data across tiers or system boundaries, especially when there is network communication involved. This is a pattern that solves performance issues around network latency

This pattern is an object that encapsulates a set of values that is moved across the boundary so that attempts to get the values of those attributes are local calls.

Insert an element after an element in an array?

  1. To begin, obtain the element to be added, such as x

  2. Then, say pos, get the position where this element will be put.

  3. Then shift the array items one position ahead, then do the same for all the other elements next to pos.

  4. Because the location pos is now empty, insert the element x there.

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

What are attributes and methods in class?

Attributes are the class member variables, the data, fields or other properties that define the class state. Methods are the functions of a class, the operations that define its behaviour, typically working in conjunction with the class member attributes to either alter the class state (mutators) or query the class state (accessors). Special methods such as the class constructors, its destructor and conversion operators are invoked indirectly through compiler-generated code while all others are called directly via programmer-generated code.

Is it usefull to share attributes among all the objects of a given class rather than each object having its own copy of data?

It is useful when the situation calls for it. For example, a static int called instanceCount that counts the number of instances of a given class that exist on the heap would definitely be shared using the keyword "static" in front of the type in the declaration because if it were not static, the count would be reset every time someone made a new object.

Scope of static variables?

Scope of static variable is with in the file if it is static global.

Scope of static variable is with in the function if variable is declared local to a function.

But the life time is throughout the program

How does knowledge of Java programming concepts benefit individuals working in almost any IT position?

http://wiki.answers.com/Q/How_does_knowledge_of_Java_programming_concepts_benefit_individuals_working_in_almost_any_IT_position"

How do you deploy a VB DLL in java?

use VC++ as a bridge between VB and Java. there seems to be no easier way than that. good luck.

use VC++ as a bridge between VB and Java. there seems to be no easier way than that. good luck.

Can transient variables be declared as 'final' or 'static'?

Transient Variables are those that do not get serialized during the Serialization process.

A Static variable is one that is mapped to the Class and is not mapped to any object instance and hence they would not get serialized. So, there should be no problem with declaring a transient variable as static.

On the other hand, A final variable is one that's value cannot change. So if you declare a final variable as transient, it would get stored as null during serialization and when you try to de-serialize the variable, you will get errors because, the variable is final and you cannot assign values for it and it is saved as null during serialization.

Result: Yes you can have static transient variables but not final transient variables.

If 2 different threads hit 2 different synchronized methods in an object at the same time will they both continue?

Of course. The synchronized keyword will ensure that only one thread will ever be allowed to execute a method at once. If two threads are attempting to access two different methods, then each method only has one thread executing it.

Is it possible to print both if statement and else statement?

Yes

int main (void) {

puts ("if statement");

puts ("else statement");

return 0;

}

What is the components of OOPS?

Java is an object oriented programming language. The various object oriented concepts in it are:

* Class * Object * Instance * Method * Inheritance * Polymorphism * Abstraction * Encapsulation etc...

Anything that is simplified depiction of a far more complex object or concept?

That's called a "model".

That's called a "model".

That's called a "model".

That's called a "model".

What is persistence in oops explain with example?

The phenomenon where the object outlives the program execution time & exists between execution of a program is known as persistance

What do you mean by protected derivation of a sub class from base class?

When you derive a class (the sub-class) from a base class using protected access, all public members of the base class become protected members of the derived class, while protected members of the base class will remain protected. Private members are never inherited so they remain private to the base class.

By contrast, if you use public inheritance, the public members of the base class remain public to the derived class, while protected members of the base class remain protected in the derived class. If you use private inheritance, both the public and protected members of the base class become private to the derived class.

Note that accessibility cannot be increased, only reduced or left the same. That is, a protected member of a base class cannot be inherited as a public member of a derived class -- it can only be declared private or remain protected.

Note also that accessibility is viewed from outside of the derived class. That is, all members of a base class other than the private members are inherited by the derived class and are therefore fully accessible to the derived class. But from outside of the derived class, all base class accessibility is determined by the access specified by the type of inheritance.

How do you generate quantum program using spss?

The Question is slightly unclear. If you have a SPSS file and you want to generate the Quantum program you can use the utility called spss2qt. This is a small program in SPSS that will convert the SPSS data into ASCII data with a Quantum program with proper column location. However you will have to modify the program to display output to your requirement as this utility will give very basic quantum program for the data. Regards Sachin You can reach me on sacsar@yahoo.com