What are the methods is class diagram?
The methods in a class diagram represent the actions that the class can perform. For instance, a method with an add(x,y) method could add two integers while a getName() could return a variable containing the name of a person.
What is an unhandled exception?
An unhandled exception is an Exception that is thrown by execution but is never caught by the program, which results in a nasty Exception Stack. This could be avoided by catching the exception in a try-catch statement, but it is not always appropriate to catch every possible exception. Sometimes the exception is the result of the client making a mistake rather than something that occurred where it is thrown, therefore the client should be informed of the exception. But most of the time it is user friendly to not propagate exceptions.
Why do you need to write brackets after such command as getName in java?
The parentheses are used in methods to specify arguments. Some methods don't use arguments; but it would in fact be more confusing, not less, to omit the parentheses in this case - because the parentheses give some kind of consistency.
The parentheses also help make it clear when something written after a dot is a field, and when it is a method. For this reason, in languages that allow you to either write or not write the parentheses for methods without arguments, I would always write them, for clarity and consistency.
The parentheses are used in methods to specify arguments. Some methods don't use arguments; but it would in fact be more confusing, not less, to omit the parentheses in this case - because the parentheses give some kind of consistency.
The parentheses also help make it clear when something written after a dot is a field, and when it is a method. For this reason, in languages that allow you to either write or not write the parentheses for methods without arguments, I would always write them, for clarity and consistency.
The parentheses are used in methods to specify arguments. Some methods don't use arguments; but it would in fact be more confusing, not less, to omit the parentheses in this case - because the parentheses give some kind of consistency.
The parentheses also help make it clear when something written after a dot is a field, and when it is a method. For this reason, in languages that allow you to either write or not write the parentheses for methods without arguments, I would always write them, for clarity and consistency.
The parentheses are used in methods to specify arguments. Some methods don't use arguments; but it would in fact be more confusing, not less, to omit the parentheses in this case - because the parentheses give some kind of consistency.
The parentheses also help make it clear when something written after a dot is a field, and when it is a method. For this reason, in languages that allow you to either write or not write the parentheses for methods without arguments, I would always write them, for clarity and consistency.
Why is everything whatever dollars and 99 cents?
when people hear 99 cents they think it's cheaper. It is psychology.
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) ; }
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
In an if statement what must enclose the condition?
In an if statement, the condition must be enclosed in parentheses.
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
What is the string and cable length on a jennings ck3.1r?
Bear says bow string length is 86.125in & buss cable length 31in
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 .........