Unanswered | Answered

Java Programming

~8100 answered questions
Parent Category: Computer 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.
In general, people will work harder when there are other people doing the same thing next to them. And with an instructor giving you every move. If you do it on your own, you are more likely not to work as hard or do as many reps. It's just the way most people are. A class also give you moves you ma…
Popularity: 161
It is not clear on what you want to do. So I'm going to guess that you want to duplicate a image changing sequence that you have on your desktop and put it on a website. If this is the case then this script will do just that. In the script find the lines that say "image1". "image 2", etc and replace…
Popularity: 131
Answer This is not a virus, but rather a method to exploit a security vulnerability in the Microsoft Virtual Machine. First, update to the latest version of Java Runtime Environment (JRE) - 6 Update 3 (as of June 2008. Click on Start > Control Panel and double click on Add/Remo…
Popularity: 1007
Java is Object Oriented computer programming language. It is used for application as well as system software development. It is best for the web based application such as servlets, XML design...etc. I.e. the application can run in the Internet. It can be used as front end tool for the back end …
Popularity: 6
They sure do have value, but I'd have to do some research to determine their true value. What is the condition of the passes? Please contact me via email so we can discuss further.
Popularity: 40
Answer You are talking about the implementation point view of Abstract class and the interface. Let's go. 1. Interface helps Multiple inheritance:- In java you can't have a class inherited from more than one class, i.e. the multiple inheritance. Interface helps us in implementing the multiple …
Popularity: 105
There could be an exception which cannot reach the user as it looks, instead it could be replaced by some other exceptions. In this case, the only solution is to write out our own exception and show the details regarding that exception. Exceptions could be thrown inside a Web Service for various re…
Popularity: 273
A "daemon" is a general English term for a process that is meant to run forever in the background, without access to a display terminal. Threads are subcomponents of processes. It is not possible to run as an isolated "thread". Every process contains at least one thread, but can contain more if prog…
Popularity: 53
sometimes there are situations where the program is vary long which can make error debugging a long process so java provides a facility to make user defined exception handling suppose we are dividing two numbers a/b and if the user enters the value of b 0, the user wants to display an error of your …
Popularity: 87
When a Java program is complied, it results is a bytecode. A bytecode is machine independent. That is, you can take the bytecode on a computer w/ any OS, hardware, processor, etc, and run it successfully there.
Popularity: 10
Java uses a code-compiler, which does not create a machine-code, like normal Windows programs, but a byte-code, which the Java interpreter runs. It is like a mini-operating system, forming a layer between the operating system and the program code. This way, you can run Java programs on almost any pl…
Popularity: 87
Follow the backslash with another backslash:System.out.println("\\ " \");will display \ " \ on the screen.
Popularity: 73
assert is a keyword added in Java version 1.4. assert tests the programmer's assumption during development without writing exception handlers for an exception. Suppose you assumed that a number passed into a method will always be positive. While testing and debugging, you want to validate your assu…
Popularity: 61
Pass By Reference :In Pass by reference address of the variable is passed to a function. Whatever changes made to the formal parameter will affect to the actual parameters- Same memory location is used for both variables.(Formal and Actual)-- it is useful when you required to return more then 1 valu…
Popularity: 41
Ans:Loading a class in JDBCFor getting connection to database and to query database for INSERT,UPDATE,DELETE and to do some operations on database through java programs you need to load the jdbc driver class for a particular database provided by the database provider for that you use class.forName()…
Popularity: 48
try with file_open command it will work. if not possible asume that as a image and then using coordinates you can get a valuebye chanti
Popularity: 78
In Java it is related to the class hierarchy of exceptions. Throwable is the root object of the heirarchy, and both Exception and RuntimeError subclass it. Methods include a "throws" clause in their signature to indicate errors of type "Exception" that can be thrown in the body of the method and r…
Popularity: 92
JRE includes (JVM ) java virtual machine and some other library files. That runs a java application. JVM - understand the corresponding byte code of a java class and make it ready for run. Another Answer: The Java Runtime Environment (JRE) is an implementation of the JVM (Java Virtual Machi…
Popularity: 223
Interfaces have only methods declared and not defined. So that these various methods can be altered or customized or written according to the need. Hence Multiple inheritance is implemented through Interfaces.Interface is a progam which just declares various methods or functions, so that any user ca…
Popularity: 50
A simple way to do this, whatever the language used, is to step through the characters in the string one by one and compare them with a previously established set of vowels, adding one to a count value every time a character matches one of the vowels. The count value at the end will be the number of…
Popularity: 89
A static variable is a variable that is allocated at compile time and that remains in memory for the entire duration the program remains in memory. Contrary to the misleading answer given below, static variables ARE variables, they are NOT constants; the value is initialised at compile time but can …
Popularity: 67
It returns memory to the memory pool by destroying objects that no longer have a reference to them. Memory management is a crucial element in many types of applications. Consider a program that reads in large amounts of data, say from somewhere else on a network, and then writes that data into a dat…
Popularity: 43
Unfortunately your question is to broad. All progamming languages vary in the way things are done. I will just give a general way of doing it. You have to pass the multidimensional array into the function by including it with calling the function. On the receiving end you have to declare another…
Popularity: 46
Answer By creating an interface, the programmer creates a method to handle objects that implement it in a generic way. An example of this would be the Runnable interface in Java. If the programmer is given a Runnable object, they do not need to know what that object really is to be able to ca…
Popularity: 87
Answer (1) In programming, the process of combining elements to create a new entity. For example, a procedure is a type of encapsulation because it combines a series of computer instructions. Likewise, a complex data type, such as a record or class, relies on encapsulation. Object-oriented program…
Popularity: 69
It is sometimes easier to deal with primitives as objects. Moreover most of the collection classes store objects and not primitive data types. And also the wrapper classes provide many utility methods also. Because of these resons we need wrapper classes. And since we create instances of these class…
Popularity: 25
yes,using frames. 18. What is the strength of the operating system? The strength of the operating system lies in its capability for handling different software, hardware Configuration used for that OS. For example a new version of windows with low ram and CPU speed etc.. The operating systems regist…
Popularity: 35
Answer The layout for toolbar is Flow Layout.
Popularity: 54
Answer In Java, if there is a run-time error then it allows the user to explicitly handle it by catching it in the catch block. If there is any error in the try block of code, automatically the flow control will be transferred to the catch block. Here Exception e indicates any exception. Answer…
Popularity: 93
Answer Yes. The main method can be overloaded just like any other method in Java. The usual declaration for main is: public static void main(String[] args) throws Exception; When you launch a java application it looks for a static method with the name 'main', return type 'void' and a singl…
Popularity: 63
No, pointer is not a data type but a reference to an object. Pointers are used to refer back to an object which can be anything from a large data value or a collection of values or objects. A pointer is a variable and is 4 bytes long because 4 bytes = 32 bits, and all addresses in 32 bit operating…
Popularity: 28
#include <stdlib.h> int **array1 = malloc(nrows * sizeof(int *));for(i = 0; i < nrows; i++)array1[i] = malloc(ncolumns * sizeof(int));
Popularity: 73
16 bit compilers compile the program into 16-bit machine code that will run on a computer with a 16-bit processor. 16-bit machine code will run on a 32-bit processor, but 32-bit machine code will not run on a 16-bit processor. 32-bit machine code is usually faster than 16-bit machine code. -DJ Cra…
Popularity: 44
They are very different. An abstract class is a class that represents an abstract concept (google define "abstract" if you're unsure) such as 'Thoughts' or 'BankAccount'. When a class is defined as abstract it cannot be used (directly) to create an object. Abstract classes are used as super-classes…
Popularity: 67
do a security bypass script...kinda like:if (User == <username>) { SecurityPerms(TRUE) }im not sure if those are the exact values the computer uses...but you should get the idea
Popularity: 36
I would not say you're outta the woods yet, my dear. Try and avoid him and if he calls, politely hang up on him. Just say, "sorry, don't want to talk to you.  Narcissist are vindictive and rage. I never knew one to ostracize.Temporary ignoring is what they do, but they are in the same room so …
Popularity: 49
Java is a OOP language and it is not a pure Object Based Programming Language. Many languages are Object Oriented. There are seven qualities to be satisfied for a programming language to be pure Object Oriented. They are: Encapsulation/Data HidingInheritancePolymorphismAbstractionAll predefined ty…
Popularity: 96
Answer The static modifier means that it does not have to be instantiated to use it. Before a program runs there are technically no objects created yet, so the main method, which is the entry point for the application must be labeled static to tell the JVM that the method can be used without havi…
Popularity: 65
Answer One can always declare a datatype as static which will limit the scope to the file only. this way data hiding can be achived. For more clearance on the same please refer 'the C programming language'. Answer Data hiding means only relevant data is visible to the user and all the back…
Popularity: 67
Answer All the methods declared inside an Interface are abstract. Where as abstract class must have at least one abstract method and others may be concrete or abstract. In Interface we need not use the keyword abstract for the methods.
Popularity: 56
Answer ObjectReference.MemberName Objectname :: memberfunction
Popularity: 48
Learn to program and learn about networking. By the time you have done that, you may realize that there are more useful, fun, and safe uses for these skills. Be a hacker, not a cracker. Hackers know what they are doing. They also don't break the law. They make people mad sometimes, but they stay wi…
Popularity: 32
Best way to learn Java is start from basic.Get a clear picture about JVM and JRE.Even if you write a simple program,try to understand what happens behind your code.I suggest you to read more about java at http://allinalljava.blogspot.com. At first while writing your code attach java source behind ,d…
Popularity: 47
A major factor in the invention of Object-Oriented approach is to remove some of the flaws encountered with the procedural approach. Object Orientation Languages (OOL) is concerned to develop an application based on real time while Procedural Programing Languages (PPL) are more concerned with…
Popularity: 55
Yes it is possible in C language.include<stdio.h>int main(void) { char *cptr; int *iptr; iptr=(int*)cptr; return 0; }If you find the info useful Please Vote!!!
Popularity: 63
I am also finding you can use this: System.out.println("\033"); I have checked it in Eclipse. Please check it in any other compiler/ IDE. Sorry Doesn't work with my Java 6 Output - /033 /033 : Your slash is the wrong way around ("\033", not "/033").
Popularity: 26
There are many differences between Java and other programs, as there are also similarities: - managed code: java does not produce native code, but some byte code that will make it runnable in something called "virtual machine". The best thing about that: compile on windows and deploy that applicatio…
Popularity: 32
Answer When you pass a parameter by value, you are creating a copy of the original variable and the receiving (method/function) cannot change the original value. When you pass by reference you are passing a pointer to the original object and therefore any changes are made to the original value.
Popularity: 18
One declares it, and the other one does it Throw is used to actually throw the exception, whereas throws is declarative for the method. They are not interchangeable. public void myMethod(int param) throws MyException { if (param < 10) { throw new MyException("Too low!); } //Blah, Blah, Bl…
Popularity: 49
Hi! Java is a language and j2ee is a plateform which implements java language.   Most people say "Java" when they really mean "J2SE" (Java 2 Standard Edition). In the context you usually see this discussed, the differences are between the J2SE and J2EE specifications. Both are ENVIRONMENTS, n…
Popularity: 8
Static identifier is an identifier whose value remain only in the scope in which it has been defined.If "static" declaration is applied to external variable, it will limit the scope of that object to the rest of the source file being compiled.
Popularity: 34
A Mechanic's lien is filed by going to the city or county recorder's office with the documentation required by the state where the property is located.To file a lien against a debtor for other purposes, the lender must sue the borrower and then enforce the judgment award as a lien against real prope…
Popularity: 12
Sadly one of the most annoying messages IE can offer as it (on the face of it) is unhelpful.... What it is trying saying is either: The app you ran tried to read or push data that is incorrect. e.g push 'x'kb to a buffer that is only 'x'-1 in size) or The web page you opened tried to push or read da…
Popularity: 22
James Gosling, PhD (born May 19, 1955 near Calgary, Alberta, Canada), along with other engineers and scientists, invented Java. Gosling is a famous software developer and is actually best known as the father of the Java programming language.
Popularity: 36
functions have independent existence means they are defined outside of the class e.g. in c main() is a function while methods do not have independent existence they are always defined inside class e.g. main() in Java is called method. ######## I've been studying OOP lately and had this question my…
Popularity: 24
Answer Almost all controls' ActionListener triggers the actionPerformed upon the enter key press Answer Using an anonymous class implementation: Component c; // this is the component you want to add a listener to c.addKeyListener(new KeyListener() { public void keyPressed(KeyEvent e) …
Popularity: 129
Java programming language was developed at Sun Microsystems by James Gosling (and originally known by the name "Oak") in early 1990s.
Popularity: 9
Just take the following book from the library:"Effective C++" by Scott Meyers. He has a whole chapter about pros and cons of Multiple Inheritance and why and when you should and SHOULD NOT use it. Also, the ultimate guide is : "The C++ Programming Language" by B.Stroustrup, the father of C++. Ch…
Popularity: 22
Answer A pointer to pointer variable can hold the address of another pointer variable. The Syntax is as follow: type** variable; Example:: //function prototype void func(int** ppInt); int main() { int nvar=2; int* pvar=&nvar; func(&pvar); .... return 0; } One more im…
Popularity: 9
The JVM is part of the JRE (Java Runtime Environment) or the JDK (Java Developer Kit). Both the JDK and JRE are packages available from a variety of sources. The most common one is available from Sun (now Oracle). You simply visit the web site, and it will then download and install the JRE for you …
Popularity: 10
Let me explain with a example. Suppose consider a method funX() which is in class Z. Suppose a programmer ABC inherited the class Z to class X and overrided the funX().So this class will have the new implementation of funX(). Suppose a programmer DEF inherited the class Z to class Y and overrided…
Popularity: 35
Dynamic polymorphism is a programming method that makes objects with the same name behave differently in different situations. This type of programming is used to allow Java Scripts to run while playing a game on the computer, for example.
Popularity: 6
the biggest advantage lies in creation of reusable code by programmers, you dont care about the specific objects used just like driving a car without knowing what plugs are in the engine. multiple forms of one object are called in the same way
Popularity: 31
Get the string from user , then U Split the string with space and put in a string array . Then Find Length of string array , Take first letter of each element in array, Except last. Assigned those to a string, then Fetch Last element of an array, Add it With that String. That's it.
Popularity: 35
While I generally prefer "C" as a more robust language, I also consider anything that is released by Microsoft to be unreliable and likely to fail. Java is the product of Sun Microsystems, and has a very good reputation. While I'm not a Java programmer, I have heard nothing but good reports about Ja…
Popularity: 51
It becomes a singleton class.
Popularity: 1
Data type: a set of values together with a set of operations Answer A category of storing information/data that may or may not be interchangeable. An int is a data type, as is boolean. Each class is also considered its own data type. In real life, "fruit" would be considered a data type, as w…
Popularity: 25
Answer You can't. But you can do something similar by making the private members in the base class protected as opposed to private. This gives derived classes access to those members.
Popularity: 44
The ability of material to maintain its basic properties under different conditions of temperature and pressure.
Popularity: 30
JDBC mean Java Database Connectivity. In java, using JDBC drivers, we can connect to database. Steps to connect to JDBC. 1) Load the driver, using Class.forName(DriverName); 2) Get the connection object, Connection con = Driver.getConnection(loaded driver name); 3) Create a SQL statement, Statem…
Popularity: 23
An identifier is nothing but a data type. It may variable, content, structure or a pointer.
Popularity: 27
Answer First of all, it only has to be the same when the class is public. And there is no explicit reason for that, it's just a convention that came along with old versions of java and people got used to it... They say it's because of the limited capabilities of the compiler to compile dependenci…
Popularity: 38
Answer That depends on the type of file and what you mean by "empty". Answer Generally, fopen() called on an existing file, with the "w" option instead of the "a" option will truncate the file to zero length. To delete a file completely is a different process. Answer Function truncate is …
Popularity: 30
Answer Static method cannot be overwritten because it belongs to the class and not to the Object Answer If you're asking about overriding or overloading, then yes. Static methods can be overridden and overloaded just like any other methods.
Popularity: 29
a class member declared as private can only be accessed by member functions and friends of that class a class member declared as protected can only be accessed by member functions and friends of that class,and by member functions and friends of derived classes
Popularity: 5
uhm this is what i think..anyone agree.. uhm, i think that the difference is that a virtual object is on the computer or on a screen like a television or a movie screen. and that the standard obejct is osmthing that the human can touch like a computer keyborad, some food, dirt, water, etc etc etc…
Popularity: 56
Exception: It is a Runtime error Exception handling if done by 1)Error detection 2)Error Reporting 3)Error Handling Is implemented by following keywords try,catch,finally,throws,throws try{} If exception occurs in try block the appropriate exception handlers that is associated with the try b…
Popularity: 10
#include <iostream>#include <stack>using namespace std;int prec (char ch){// Gives precedence to different operatorsswitch (ch) {case '^':return 5;case '/':return 4;case '*':return 4;case '+':return 2;case '-':return 1;default :return 0;}}bool isOperand(char ch){// Finds out is a charact…
Popularity: 32
Quick answer Java is an object-oriented computer programming language that is used for application as well as system software development. It is best for web based applications such as servlets, XML design...etc., i.e. the applications that can run on the Internet. It can be used as front en…
Popularity: 70
Multiple inheritance should be applied when it is fit into the design, like any other features, not because it must be applied because it is available, or it is fun to apply. Multiple inheritance occurs when an object IS more than 1 thing, and being one of them, may have nothing to do with being an…
Popularity: 3
While there are several implementation of the JVM, you can find the one from Sun at http://java.sun.com/javase/downloads/index.jsp
Popularity: 34
// Returns number of 7s in num. int numSevens(int num) { int _num = num; int numSevens = 0; while( _num > 0 ) { if( (_num % 10) == 7 ) { ++numSevens; } _num /= 10; } return numSevens; }
Popularity: 24
The machine instructions that are interpreted by the virtual machine they are written for.
Popularity: 5
An abstract class can have a combination of abstract methods and normal methods.Interfaces cannot implement any methods themselves, all have to be abstract.Other classes can extend only one class (abstract or not), but can implement as many interfaces as they want.
Popularity: 3
A float is a type of object that can stay on water without sinking to the bottom. These objects are known for their buoyancy, such as buoys.
Popularity: 0
When a thread is created the threads does not require any new resources to execute the thread shares the resources like memory of the process to which they belong to. The benefit of code sharing is that it allows an application to have several different threads of activity all within the same addres…
Popularity: 4
Freeware means that a program or system is available without charge for an unlimited amount of time. This is in contrast to commercial software, where you must pay to get the software, or shareware, where you may have a trial period of a certain amount of time or have features removed.
Popularity: 4
Answer please answer the question write a program which reads names of students and their telephones from a file and produce a linked list ordered in alphabetical order by the surname of the student.
Popularity: 18
Answer Numerology in Abstract The abstract of numeralogy is that each person can be labeled with certain qualities by their birth date and name along with any name changes. This interpretation of numbers gives life lessons, luck and other factors in a persons life. This method of life lessons is …
Popularity: 15
by adding a get request statement String itemQ= request.getParameter("t1");
Popularity: 9
According to NABARD ACT 1982 NABARD was set up to provide refinance to banks for all kind of agricultural investment and small scale industries and other allied activities.Erlier RBI use to the operations of Agricultural Refinance and Development Corporation for RRB. Now NABARD has taken over all th…
Popularity: 1
because of the mass .it has a lot of air resistance.
Popularity: 1
run time ,, compile time polymorphism
Popularity: 2
It is a generic term for screwing the program code up. It means that somewhere in the coding it is not doing what it is supposed to do. Say you wanted to add the amount of apples and then print the amount for inventory. The code says that it is adding the apples then sending a zero amount for the am…
Popularity: 14
Objects that do not implement Serializable.
Popularity: 36
Java is robust because it is highly supported language, meaning that unlike C you cannot crash your computer with a bad program. Also, another factor in its robustness is its portability across many Operating systems, with is supported by the Java Virtual Machine.
Popularity: 36
"A class containing a static variable that stores a unique, and inaccesible to external classes (private), intance of itself. The static variable is accessed by a static method, with public access, usually called getIntance. The static variable is initiated by the static getInstance method that …
Popularity: 25
Declaring strings as char* is generally faster than declaring an array of type char. Consider the following: include<stdio.h> int main (void) { char c1[12] = "Hello world"; char c2[] = "Hello world"; char* c3 = "Hello world"; // ... return 0; } The string literal, "Hello worl…
Popularity: 1