What are the features which makes Java pure object oriented?
Java is actually not a pure object oriented programming language. See the related question below for the reasons why.
What are two basic steps for event handling in java?
1.Implement the Listener interface and overrides its methods
2.Register the component with the Listener
What are the rules in naming a source file in JAVA program?
The basic rule is that the file name should match the name of the topmost public class in the .java file. The names are usually camel case and can contains alphabets and numbers. It should begin only with an alphabet.
2 types of identifiers in C programming language?
1. identifiers beginning with a letter
2. identifiers beginning with an underscore
API = American Petroluem Institute
NDT = Non-destructive Testing
NDT is a process of testing the integrity of a piece of pipe (oil well tubing or casing) that does not damage the material in any way. There is wide range of ways to perform NDT evaluations on tubing and casing products.
The default case.
Name something a naughty child might throw in a class?
pen/pencil book
paper air plane
spiltball
food
1 22 333 4444 55555 i need a java program that generates a triangle with these numbers?
Implement this method:
public static void makeTriangle(int limit) {
int count = 0;
for(int i = 1; i <= limit; i++) {
count = i;
while(count > 0) {
System.out.print(i);
count--;
}
System.out.println();
}
}
How java programs can ensure wora philosophy?
Translating a java program into bytecode makes it much easier to run a program in a wide variety of envirenments becouse only the JVM needs to be implemented for each platform.Once the run time packages exists packages exist for given system, any java program can run on it.
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.
Which protocol offers guaranteed delivery and is connection oriented?
Transmission Control Protocol (TCP) is used when data reliability is needed since it is connection oriented and guarantees delivery.
A bowel loop is a functional obstruction of the intestines that prevents the normal transit of the products of digestion. The problem can occur at any level distal to the duodenum of the small intestine. When it occurs, it's always a medical emergency and may require to be treated surgically.
A string variable is a programming language construct that holds text. For example, the text "The sky is blue" could be stored to a string variable, then later in the program, that text could be displayed.
It is a technique that uses accounting entries to allocate the indirect costs of running the IT department. it has 4 methods: # no charge method
# fixed charge method
# variable charge method based on resource usage
# variable charge method based on volume
Java applet program to accept two numbers in text field and add two numbers?
package AddNumbers;
public class AddNumbers {
public static void main(String[] args) {
int Int;
int a = 4;
int b=5 ;
int sum = a + b;
System.out.println("Addition of two numbers!");
System.out.println("Sum: " + sum);
}
}
Why is string type array used in the parameter of the main method?
A user can run a program from the operating system command line, passing parameters. For example, in the case of a Java program:
Java MyClass John Doe 1 2 3
In this example, the program "Java.exe" receives all the parameters starting with "MyClass" - a total of 6 parameters in this example. Then, the JVM runs the class "MyClass", and this class receives the remaining five parameters - as an array of strings.
You can pass any information to a program this way; for example, a program that processes files might receive the file name, or a directory (folder) name as a parameter.
How do you get the class file size in java?
You look at the file. A program such as Windows Explorer - or the equivalent in other operating systems - can tell you the size. Also, a command such as "dir" (in Windows), or "ls" (in Linux or Unix).
What is the hashCode method and what is the purpose of this method in Object?
The hashCode method is used to create a unique identification number to describe the state and type of an object.
The Java API description of the method is:
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.
The general contract of hashCode is:
As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)
Hypernet in Java is a library for Java, which provides a object-relational map for the Jaza language. Also referred to as (ORM).
Write a program in java on Crytography?
/*Input: Enter the String: AHFJFJ
* Enter the gap : 2
*Output: CJHLHL
*/
import java.io.*;
class Crypt
{
protected static void main()throws IOException
{
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter the String: ");
String s=in.readLine(),s1="";
System.out.print("Enter the Gap: ");
short g=Short.parseShort(in.readLine());
for(short i=0;i<s.length();i++)
{
char ch=s.charAt(i);
if(Character.isUpperCase(ch))
{
ch+=g;
if(ch>'Z')
ch-=26;
else if(ch<'A')
ch+=26;
s1+=ch;
}
else if(Character.isLowerCase(ch))
{
ch+=g;
if(ch<'a')
ch+=26;
else if(ch>'z')
ch-=26;
s1+=ch;
}
else if(Character.isDigit(ch))
{
ch+=g;
if(j>'9')
j-=10;
else if(j<'0')
j+=10;
s1+=ch;
}
else
s1+=ch;
}
System.out.print("String: "+s1);
}}
What company makes the Jinitiator?
The company that makes the software known as "Jinitiator" is Oracle Corporation. The software Jinitiatir is a JVM which stands for Java virtual machine.
Why keyword static is to include in main method?
A class may have both static and non-static methods. Non-static methods are local to objects of the class (instances of the class) and are often known as instance methods for that reason. Being local to an object means they can refer to the current instance of the class through the implicit "this" reference. Static methods, on the other hand, are local to the class and do not have an implicit "this" reference. As such, static methods can be invoked even when no instances of the class are in scope.
Since the main function is the entry point of the application and there can be only one entry point, it doesn't make any sense to declare it an instance member because no objects of the class would physically exist.