What is a Class 3 Public Primary Certification Authority?
A cross-certificate is a certificate issued by one Certificate Authority (CA) that signs the public key for the root certificate of another Certificate Authority. Cross-certificates provide a means to create a chain of trust from a single, trusted, root CA to multiple other CAs.
In java what is empty statement.Explain its usefulness?
An empty statement in Java is just that: a statement with nothing in it. There are typically two ways to represent this:
Why is 2147483647 the biggest number Java can handle?
In reality, it's not. 2,147,483,647 is the largest number that an int type can hold. This is because Java uses a 32-bit signed integer value for ints. Since it's signed, one bit needs to hold the sign value, leaving us 31 bits for storage. 231 = 2,147,483,648, which is the total number of values which can be held in 31 bits. Since we also need to store a zero, our maximum is 2,147,483,647. The total range of data which can be held in an int is [-2,147,483,648 : 2,147,483,647].
But, as was said above, this is not the biggest number Java can handle. It also has support for 64-bit long integer types. This type can hold values in the range [-9,223,372,036,854,775,808 : 9,223,372,036,854,775,807].
And finally we have the BigInteger class, which can hold infinitely large numbers, limited only by the physical capacity of your storage space (RAM).
When a class uses dynamic memory what member function should be provided by class?
the copy constructor
What a java program to find largest and smallest value store in the array?
Implement these methods:
public static int smallest(int[] arr) {
int small = arr[0];
for(int i = 1; i < arr.size(); i++)
if(arr[i] < small)
small = arr[i];
return small;
}
public static int largest(int[] arr) {
int large = arr[0];
for(int i = 1; i < arr.size(); i++)
if(arr[i] > large)
large = arr[i];
return large;
}
How do you clear screen in java eclipse?
There is no way to clear the screen inJAVA. It seems that you are a beginner in Javaand just migrated from age old Turbo C.
The reason because there is no clear screen is that you will never need it when you develop actual Javaprograms. Have you ever seen an application that clears it screen (apart from DOS based applications).
When you develop an application for a client, you do not expect him/her to go through your clumsy console. The console is available only for debugging purposes or for learning the language. When you deploy your application, you always have an interface associated with it (like your own internet browser or any other window).
So stop worrying about clearing the screen.
Of course, you can still manually clear the screen of text by printing out enough blank lines to run all other text out of the terminal window.
Most console windows will start of with about 25 lines of text, so something like the following should do what you want in most cases:
for(int i = 0; i < 40; ++i) {
System.out.println();
}
What is the difference between data binding and encapsulation?
Data binding is to tie 2 data sources together at runtime. This technique is very useful in writing software that requires different source of data in different environments (design, test, and production environment; client's region, time zone, and the language used)
Encapsulation is to hide information (data and/or behaviors). This technique is used for design and coding only. It has nothing or little to do with runtime.
These 2 techniques may work together from time to time, but I don't think they have anything to do with each other.
What is the difference between properties and characteristics?
PROPERTIES are basic (or essential) elements or attributes, owned or possessed by something. Usually, the properties are concrete, intrinsic and objective.
CHARACTERISTICS are prominent aspects, qualities or features of something. Normally these are extrinsic and subjective.
For example, the characteristic of iron is that it is hard while its property is that its melting point is 1811K.
Why does Java Force Interface Methods to be Public?
They can't be private...what's the point of a private interface method? It can't be called by anything.
It can't be protected for a similar reason. Interfaces are simply for exposing public functionality to other classes. If you want protected status, then create a new class and inherit the methods, because protected restricts access to the class tree I guess you have to stand back and look at what the "Interface" design is for. It is to allow objects that possibly come from different packages and even vendors (this is the basis for J2EE design and implementation) to interoperate with a known reference point.
If you need to hide methods between your own modules (which this appears, to me, to be your problem) then you should be able to accomplish it with an Abstract Class and get around your issues? Of course, you can also use the default (no) access modifier to allow only package classes and subclasses to call the methods of an interface.
What is marshalling and Demarshalling?
data marshalling in java means that the structured data item is flattening and converted into external representation
data demarshalling is the process of convert the data back to the internal representation and rebuild the data structures.
What are the advantage disadvantage of using cellphone inside the?
The advantage of using a cellphone is that it is portable and affordable. It therefore makes communication easier and faster. The disadvantage is that it may lack privacy and may be very costly.
Difference between object declaration and object creation?
Declaration of the object involves only creating the reference variable to the object. Example: class SampleClass{ } Object Declaration: SampleClass obj1; Object Creation: Creating an object involves use of new keyword and actually allocating memory for that object. SampleClass obj2 = new SampleClass ();
// Get input
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String input = in.readLine();
in.close();
// Parse input
int sum = 0;
StringTokenizer parser = new StringTokenizer(input);
while (parser.hasMoreTokens()) {
int currentInt = Integer.parseInt(parser.nextToken());
System.out.println(currentInt);
sum += currentInt;
}
System.out.println("sum = " + sum);
Difference between big M method and two phase method?
Ans. 1. The big M method solves the problem in one pass, whereas the two phase
method solve it in two stages.
2. The big M method is computionally inconvenient due to existence of the large number M The two phase method does not involve M during
computation
3. The big M method present a difficulty when the problem is solved on digital computer, but there is no such type of problem in two phase method.
A float is a pre-determined amount of cash (notes & coin) ie. at start or end of shift before any sales are put through. eg. My work has a float of $300.00 AUD which I have to count before I start my shift then again at end of shift or end of day. I deduct the $300.00 from the toal and the rest is banked in a drop safe with a balance sheet leaving a "float" of $300.00 for the next operator. -Grant
Three types of program errors and examples?
Intellisense does an excellent job of catching syntax errors. While you may hate the squiggly line
that Intellisense displays, it ' s a lot easier for Intellisense to detect and isolate syntax errors than it is for you to do it yourself.)
The key to fixing logic errors is to be able to reproduce the error consistently. A repeatable logic error is much easier to track down and fix than an error that appears to be occurring randomly. you will learn the details of using some of the tools Visual Studio provides to help you detect and isolate program bugs.))
The name 'i' does not exist in the current context refers to a type of semantic error. There may well be a variable named i defined somewhere in the program, but it is not currently in scope. That is, you are trying to use i when it is out of scope.Intellisense does a good job of detecting semantic errors.)
Determinant of matrix in java?
/*This function will return the determinant of any two dimensional matrix. For this particular function a two dimensional double matrix needs to be passed as arguments - Avishek Ghosh*/
public double determinant(double[][] mat) {
double result = 0;
if(mat.length 2) {
result = mat[0][0] * mat[1][1] - mat[0][1] * mat[1][0];
return result;
}
for(int i = 0; i < mat[0].length; i++) {
double temp[][] = new double[mat.length - 1][mat[0].length - 1];
for(int j = 1; j < mat.length; j++) {
System.arraycopy(mat[j], 0, temp[j-1], 0, i);
System.arraycopy(mat[j], i+1, temp[j-1], i, mat[0].length-i-1);
}
result += mat[0][i] * Math.pow(-1, i) * determinant(temp);
}
return result;
}
Are webpages that contain hypertext markup language commands typically written in Java?
No, they usually are written in plain text. HTML is a formatting language that explains to a browser how to display content. Java is a programming language that controls the computer. Many times a website will contain JavaScript, which is a completely different language that Java.
What is the relationship between JSP and JDBC?
There is no other relation apart from having Java in their names.
JSP is a technology that is used to create powerful User Interface components
whereas
JDBC is a technology that is used to connect to Relational Databases like Oracle or Sybase
C plus plus and java are examples of what languages?
They are not examples of languages. They arelanguages.