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 does java and java fx do?

JAVA is Group Of Technologies Like Java SE, Java EE, Java ME

and Java FX is a Latest Technology Released From SUN Micro Systems

Sun Developed Java FX as Counterpart to Microsoft's Graphics Libraries and Rich Support of Visual Studio to GUI Classes of .NET Framework.

But in JAVA FX We can Do some advanced Graphics Operations in Programming Apart From AWT & Swing of Java SE and Rich Internet Application Technologies Like Enterprise Java Beans (EJB),JSP Of Java EE.

Java code to average and total a set of numbers?

The below method is written in the assumption that, the n numbers are sent as an ArrayList of Integer values.

public void computeSumAndAvg(ArrayList lst){ Iterator itr = lst.iterator();

int sum = 0;

float average = 0;

int count = 0;

while(itr.hasNext(){ Integer val = (Integer) itr.next();

sum = sum + val.intValue();

count++; }

average = sum/count;

System.out.println("Sum is: " + sum) ;

System.out.println("Average is: " + average) ; }

How do you implement vector?

import java.util.Vector;

public class VectorTest {

/**

* @param args

*/

public static void main(String[] args) {

//instantiating a vector

Vector vct = new Vector();

//Add objects to a vector

vct.add("One");

//getting values from the vector

String val = (String) vct.get(0);

//vector size

System.out.println("Vector size is: " + vct.size());

//removing elements from a vector

vct.remove(0);

}

}

Difference in hibernate 2.0 and hibernate 3.0?

Enhanced Hibernate Query Language

Enhanced Hibernate Criteria Query API

Enhanced support for queries expressed in the native SQL dialect of the database

Is screenr safe?

i Would say it because when i used to use it it would run slow and i got a warning from java

What is the difference between implicit and explicit Java programming?

Explicit means done by the programmer.

Implicit means done by the JVM or the tool , not the Programmer.

For Example:

Java will provide us default constructor implicitly.Even if the programmer didn't write code for constructor, he can call default constructor.

Explicit is opposite to this , ie. programmer has to write .

Program to make frequency count of words in a given text?

class Count

{

public static void main(String args[])

{

int i,c=0;

int n=args.length;

System.out.println("length is"+n);

for(i=0;i<args.length;i++)

{

System.out.println(args[i]);

c++;

}

System.out.println("number of words="+c);

}

}

What do you mean by public private protected and friendly?

An Access Modifier is a key word in java that determines what level of access or visibility a particular java variable/method or class has. There are 4 basic access modifiers in java. They are:

1. Public

2. Protected

3. Default and

4. Private

Java does not have a friendly access modifier.

Public Members:

If a variable or method is declared public, it means that it can be accessed by anyone or any other class (irrespective of which package they are in).

Private Members:

Members marked private can't be accessed by code in any class other than the class in which the private member was declared

Protected and Default Members:

The protected and default access control levels are almost identical, but with one critical difference. A default member may be accessed only if the class accessing the member belongs to the same package, whereas a protected member can be accessed (through inheritance) by a subclass even if the subclass is in a different package

Describe two examples of Java-based applications that might use methods that have two or more parameters?

One practical example would be an application that would need to compute interest earned on a savings account or multiple savings accounts at the end of the year. Another would be an application that tracks a person's name and age and then sorts them into similar or randomized groups.

Write a program that give all the rotations of a string?

#include<stdio.h>

#include<string.h>

int main()

{

char a[80];

int rotated_element_number[80];

int rotation;

int i;

int length;

printf("enter the word: \n");

gets(a);

length = strlen(a);

printf("the reversed string is:\n");

for( rotation=0; rotation<length; rotation++)

{

for( i=0; i<length; i++)

{

rotated_element_number[i] = i + rotation;

while(rotated_element_number[i] > (length-1)) rotated_element_number[i] -= length;

printf("%c", a[rotated_element_number[i]]);

}

printf("\t");

}

getchar();

return 0;

}

How many threads run at the start of JVM?

at the starting of the JVM it handels approx 7000 threads .........

Can you instantiate an abstract class?

No. You must create a subclass of the abstract class in order to be able to instantiate it.

Types of purchase method?

What is the type of purchase method? And I want to know about what different between purchase method and pooling method?

installment plans: People began to buy expensive goods using installment plan credit during the 1920s.

What is static key word?

It is one of the constant key word and it is used only in run time

What is mean by class access?

Class access is the ability for any given class to access the functions of another class. Private access limits access to data and code just to the class that contains the private access modifier. The so-called "default" access grants private access, as well as access to any class in the same package. Protected access grants the same as "default" access, and also allows subclasses to access the code and data. Public access allows any class in any package to access the code and data.