Which is the primary need to develop Java programming from C plus plus?
The primary need to convert any language source, including C++, to Java is simply one of portability.
While C++ is itself portable, writing cross-platform code requires that you write code in a more abstract manner than you would when writing for a specific platform, making extensive use of compiler directives to determine which version of each translation unit will be compiled upon which particular platform. This increases code maintenance because you must then maintain separate versions of the platform-specific code, as well as include a different set of headers for each platform, and thus call different functions for each platform. You must also compile the source separately upon each supported platform, which means the code must be as generic as possible in order to be understood by every possible compiler. Thus cross-platform C++ code tends to be limited to the most popular platforms only, which usually means Windows and Unix only.
Java's higher level of abstraction is such that you need only write one set of instructions and compile it one time only. The Java virtual machine handles all the low-level machine specifics, so the same executable will run on any machine that has a Java virtual machine implementation. While this greatly reduces code maintenance and increases portability, the need to interpret the compiled byte code (rather than native machine code which requires no interpretation) reduces performance enormously. Thus the ease of maintenance has to be weighed against the loss of performance to determine if it is a worthwhile exercise.
What mean by multithreaded program?
A multithreaded program is one that has multiple threads in execution. They may execute parallel to one another or totally without relation to one another.
In Java you can create multithreaded programs using Java threads.
What is reference data types in java?
A reference variable is used to refer to (or access) an object. A reference variable is declared to be of a specific type and that type can never be changed.
Ex:
ArrayList lst = new ArrayList();
The above line creates a reference variable lst which refers to an ArrayList object
AWT stands for Abstract window tootlkit . Abstract window Toolkit provides a standard application programming interface for writing graphical user interfaces in java.
Can we use SQL for java language?
No. SQL stands for Structured Query Language and that in itself is a language and it is totally different from Java.
However, you can use SQL queries inside Java code with the help of JDBC (Java DataBase Connectivity). But the Java compiler cannot understand/compile standalone SQL syntax unless it is used as part of JDBC.
What types of analyses use case study data?
Case studies are used for the following analyses: industry analysis; product/service analysis; financial analysis; and management analysis.
What are the main lubricants used in forging?
Lubricants used are oil, graphite, water and synthetic lubricants.
Why does java not support multiple inheritence?
The superclass of all the classes in Java is Object,So any class we created is a instance of Object. Assume there is a class Father and Class Uncle,Now the class called child will have to inherit the features of father and Uncle which inturn will have some common features.So the child class would not be sure of whether to inherit the common feature from Father or uncle. This is known as the diamond problem - http://en.wikipedia.org/wiki/Diamond_problem
There is nothing like virtual in Java
binary search system
What is the input and output to a Java interpreter?
The input is source code (MyClass.java) and the output is bytecode (MyClass.class).
Generally, Java compilers receive as input .java source code files, and output .class binary files which are then executed by the Java Virtual Machine (JVM) executable.
Some Java compilers output binaries in machine code that can be directly executed.
The input is a source file with the java extension. (i.e. HelloWorld.java) The output is the byte code file with the class extension. (i.e. HelloWorld.class)
Input:
1. Most compilers take as input the source program which is in a particular programming language.
2. Compilation Switches ( special arguments that tell the nature of compilation and structure of target code).
3. Supporting Files (Library Files) such files help in the execution and translation of a program
Output:
1. Program List file.
2. Target Code. Target code is the equivalent of the source code but in another language
Java source code to find prime number?
/* Program to Find whether number is Prime or Not. */
class PrimeNo{
public static void main(String args[]){
int num = Integer.parseInt(br.readLine());
int flag=0;
for(int i=2;i
Does Java use your graphics card?
Well actually it depends. If you plan on making graphics with java, then yes. Otherwise no. Hoping this comes to use.
What is a multivalue attribute relating to database?
A multivalue attribute is the practice of maintaining more than a single value in a database column. Lets say for example you want to know the hobbies for a client. The proper way to handle this is to maintain the data in a one - to - many child table. Another way is a multivalue field. This in effect is a text field (varchar, etc) that will contain one or more values, separated by a comma (as an example).
This of course is NOT the way to go and will cause performance problems in parsing the information and make many reports and logical use of the data very difficult (but possible).
Can Static data members be declared either in the private or public section of class declaration?
Yes. Static members can be private or public. (Or protected.)
this keyword is used to avoid complication between instance variable and local varible.
we identify instance variable by using this keyword(e.g: this.a=a;)
Which program uses actionscript as its programming language?
Adobe Flash uses actionscript. It is the main programming language for flash.
What is the Jasper Reports tool?
JasperReports is a open source reporting tool which can be embedded into a Java application. It can be used in Java enabled applications including Java EE or web applications.
The database environment refers to the components inside a database. Some of these include hardware, software, data, as well as the procedures.
What kind of file contain java source code?
'.java' files contain java source code. One can access these files on windows by using 'notepad'.
is an array with more than one dimension each dimension has different size
ex:
10 20 30
11 22 22 33 44
77 88
Encapsulation data we can inherit out side the class?
Yes. If the variables are public yes they can be inherited. If they are private then they cannot be inherited. But to access these private variables you can have accessor methods that are public and can be accessed everywhere.
Is it possible while developing any software by using java can you manage database?
Yes. In Java this is done through the JDBC classes.
Yes. In Java this is done through the JDBC classes.
Yes. In Java this is done through the JDBC classes.
Yes. In Java this is done through the JDBC classes.
Why you neet interface in java?
When you need the benefits of multiple inheritance while avoiding the DDD (Deadly Diamond of Death). Java doesn't allow multiple inheritance anyway.