Unanswered | Answered

Java Programming

~9200 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.
Answer The Carnegie system awards 1 credit per 50 or 55 minute class session per week over the course of a semester. I assume the statement means there is more (or less) class time required for the programming courses. It may be that the courses are "stacked" or offered in another alternative de…
Popularity: 214
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
Answer I have had this same problem about 6 years out of the 18 I have had this pool. If the bugs are little guys that look like a simple, long, black bug, with 1 wing or fin on each side. Every time you pick them up with a skimmer, they jump back in the pool and swim around. I have seen…
Popularity: 91
I think the reason this question has gone unanswered is 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…
Popularity: 131
As an "F" that averages into (and brings down) your GPA, just the same as any other grade. See what your college's rules and procedures are for taking the class over again. Some colleges count both grades and your net grade for the course is the average of the two of them. Others let the more recent…
Popularity: 164
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
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 a exception which cannot reach the user as it looks, instead it could be replaced by some other exceptions. In this case, the only solutions is to write our own exception and show the details regarding that exception. Exceptions could be thrown inside a Web Service for various reason…
Popularity: 273
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
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
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
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
Answer When there is no further use of derived class obect in execution sequence then It gets deleted. calling of distructor sequence is reverse of constructor calling sequence ,so first derived class obect deleted than base class obect.
Popularity: 87
Answer Fundamentally any pointer in C is a reference to a memory location somewhere in system memory. While this seems simple in theory, in practice this is more complex when the microprocessor architecture is considered. Two considerations in computer programs are code size and speed. For this…
Popularity: 73
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
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 "Java" refers to both a language and a platform. The runtime and libraries that comprise the platform are based on the Java language and come in 3 flavors: Java SE (Standard Edition): Formerly J2SE but renamed to Java Standard Edition when the Java 2 convention was dropped with the r…
Popularity: 69
#include <stdlib.h> int **array1 = malloc(nrows * sizeof(int *));for(i = 0; i < nrows; i++)array1[i] = malloc(ncolumns * sizeof(int));
Popularity: 73
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 at the starting of the JVM it handels approx 7000 threads .........
Popularity: 77
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
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
Answer The first step is to install the XCode developer tools that comes with OSX. You can do this by looking on your OSX install disc. There should be a folder for optional installs, and a package for XCode. This will automatically install gcc, a C compiler, on your machine. Next, find th…
Popularity: 98
We can't instantiate both interfaces and abstract classes.The only one difference between them is that an interface can't contain concrete(fully defined) methods where as an abstract class may contain them. An abstract class not necessarily contain abstract methods. we can make a class as abstract c…
Popularity: 69
ABCAdaAlgol 60Algol 68APLArcAssemblyAwkBASICBatchBCPL BefungeBETACC++C--C# (pronounced C-sharp) CHILLClipperCobolCobolScriptComponent PascalCycloneDDATABUSEuphoriaForthFortranFree PascalGNU PascalIconIDLJalJavaScriptJovialLagoonaLedaLimboLuam4MapleMathematicaMATLABModula-2Modula-3MumpsOberonObject…
Popularity: 156
NO full form of java. just it stands for hot and aromatic coffee.It is just an abstract name that the devlopers gave.
Popularity: 94
Core Java has to do with the basic package of Java objects that are typically used for general desktop applications. These objects come in the 'Standard Edition' of Java Advanced Java could actually refer to any advanced topic having to do with Java programming-- and there are many. The other pac…
Popularity: 150
A atom consist out of 2 parts where as the centre is called the nucleus which is form out of Protons and neutrons and the outer part that orbits the nucleus is Electrons. Protons is positively charged, Electrons is negatively charged and neutrons well you guessed it, its neutral. When 2 or more obje…
Popularity: 160
Java is pure object oriented programming language than c++, it uses the concepts of Classes, Objects, Inheritance, Polymorphism. And the execution of a program is non-linear. Java's motto (so to speak) is "write once run anywhere". When you compile a Java program, an intermediate bytecode is gener…
Popularity: 133
I would say it impossible not to do it right!
Popularity: 92
The biggest disadvantage is to limit the program flow in 1-dimensional (or linear way). Most of software developers would have been brain-washed to think this way. When dealing with 2 dimensional subjects such as concurrency, multiple threads, synchronization, etc., the topics become E.T. subjects! …
Popularity: 72
Dynamic Binding means declaring variables at run time only rather than declaring it at compile time.
Popularity: 93
import java.io.*; class ShopReceipt { protected static void main()throws IOException { BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Enter the no. of types of Items Purchased: "); byte z=Byte.parseByte(in.readLine()); String n[]=new String[z]; byt…
Popularity: 170
Data hiding is one of the important aspects of a class. Data hiding means to hide the members of the class and providing the access to only some of them. we can make the members of the class private or public. in private,the outside world cannot access those members which been made private.and rest …
Popularity: 137
It means that you have tried to use a method which doesn't exist.
Popularity: 149
Internet users can use java to create applet programs and run them locally using a "java enabled browser" such as hotjava they can also use a java enabled browser to download an applet located on a computer to download an applet located on a computer anywhere in the internet and run it on their loca…
Popularity: 79
//testing code//note that a space character should be neither a vowel, nor a consonantstring s = "This is a test";Console.WriteLine("Source string: {0}", s);Console.WriteLine("# of Vowels: {0}", GetCount(s, "aeiou"));Console.WriteLine("# of Consonants: {0}", GetCount(s, "bcdfghjklmnpqrstvwxyz"));// …
Popularity: 73
Remember that the Vector class is a subclass of AbstractList. Also remember that the Collections class has an efficient sorting method which works on lists. // Sample code: // Create a new Vector and fill it with out-of-order data Vector<Integer> v = new Vector<Integer>(); v.add(9)…
Popularity: 124
container class contains some abstract methods that are implemented in its subclasses that's why the container is an abstract
Popularity: 75
an Object is an instance of the Class for ex: Integer i = new Integer (1); i is an object of the Class Integer. of courses classes contain variables and methods and constructors. although the Object Class is a different case, it's the main class that all the classes in java are subClasses of it
Popularity: 136
Two methods can have the same name provided their signature is different. Ex: public int add(int a, int b){ ... } public int add(int a, int b, int c){ ... } This is allowed whereas public int add(int a, int b){ ... } public int add(int a, int b){ ... } This is not. The above only app…
Popularity: 148
I will assume that you mean in a broad spectrum in this answer. Java is intended to be a cross-platform full programming language. It has the three (or four) control structures necessary for any program: Sequence, Descisions, and Loops (and Modules, functions and classes).This means that it can m…
Popularity: 97
As there are more than one JVM implementations, there is not a single language used to implement them all. Off the top of my head, I can list JVMs that are implemented in C, C++, Java (yes, a JVM in Java), Objective C, and even one in Javascript (don't ask why).
Popularity: 123
Below is a simple example- the function of the code below is to print out the words "Hello" "world" to the screen. public class Hello {//opens class public static void main(String args[]) //main method { System.out.println("Hello world"); //prints words in brackets to the screen }//closes main…
Popularity: 139
//call this method inputing the string you want to testprivate void palindromeTest(String input){String output = """+input+"" "; output = output + ((getReverseString(input).equals(input)) ?"is a palindrome" : "is not a palindrome");System.out.println(output);}private String getReverseString(String i…
Popularity: 143
In object oriented programming language, it is possible to override classes. and the advantage over this is we can just show the or run the methods of the base class.
Popularity: 146
This is a way to organize files when a project consists of multiple modules. It also helps resolve naming conflicts when different packages have classes with the same names. Packages access level also allows you to protect data from being used by the non-authorized classes.
Popularity: 122
my self is a computer teacher,from my point of view ,some project topics are: BANKINGONLINE QUIZBILL Preperationticket reservationA SMALL GAME
Popularity: 80
It is possible in JDK 1.5 and above. In JDK 1.4, you also cast the Float value into float value by using casting. For exampe in JDK 1.5, its possible float f = 12; Float ff = f; but in JDK 1.4, you will use casting i.e float f = 12; Float ff = (float)f;
Popularity: 118
JPanel is a general purpose container used to organize and manage the groups of related components. It is a light weight container which can be contained within another container.
Popularity: 238
Over abstraction, in computer programming terms, means that you use inheritance too often in your code. If you look for any two classes which share a common function and make an abstract class for them to inherit, then you are most likely guilty of over abstraction. This is a common problem found i…
Popularity: 126
Answer A compiler only converts source code to binary code for direct execution after compilation is complete, while an interpreter converts source code to binary code in real time and executes the code on behalf of the source code. Generally, interpreted code runs slower but is easier to find and …
Popularity: 155
import java.io.*; import java.applet.*; import java.awt.*; public class flag extends Applet { public void paint(Graphics g) { g.fillOval(60,450,120,50); g.fillRect(110,60,10,400); g.setColor(Color.red); g.fillRect(120,80,150,30); g.setColor(Color.white); g.fillRect(120,110,150,30); g.se…
Popularity: 87
Yes, since it can only play in some computers and not all computers can read it. Every Java application needs a minimum system configuration requirement which if not met, the machine will not be able to run Java. Java the language itself is NOT machine dependent. To run a program written in Java, i…
Popularity: 153
import java.io.*;class kaprekar { public static void main(String args[])throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter any number"); int n=Integer.parseInt(br.readLine()); int t=n,count=0; while(n!=0) { n=n/10; count+…
Popularity: 171
Implicit casting is done automatically by the compiler and virtual machine. Explicit casting is needed to convert types of data when Java is not sure if the result will be valid. There are two times when you will need to perform explicit casts: casting between primitives and casting between objects…
Popularity: 119
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: PublicProtectedUnspecified (package-private)Private Classes can only be declared public or left unspecifie…
Popularity: 144
Popularity: 88
It is used to convert the value of one datatype into a value of another datatype. Example- Integer.parseInt(in.readLine); It converts given value to Integer datatype.
Popularity: 115
VB.NET is used for e-banking.It is the language in which all the options are used just by tool box that is at the right hand side of the window. This question is like asking "what brand of wrench is used to make cars?". There are thousands of different e-banking sites and connections, and they use …
Popularity: 96
No. An abstract method must be overriden in an subclass. If the method is final then it can't be edited.
Popularity: 135
Implement this method: public static boolean isDivisible(int a, int b) { if(a % b == 0) { return true; } else { return false; } }
Popularity: 82
A (java) class file was not be made to be opened and modified by hand for the users. A class file is the resulting byte code of your java file compilation.This class file can be interpretaded for any jvm. To run your java class you only need to write these instructions in your command line.java [ op…
Popularity: 122
C# and Java have many similaries. If you learn one, you won't have much of a problem learning the other.
Popularity: 144
not an actual code line you need to redefine the script
Popularity: 87
He is the father of the Java programming language.
Popularity: 147
Instantiate means to create an actual instance of a Class. That is, the creation of an Object of that Class. This allocates memory on the heap for that object. Instantiate creates a unique object of that class, complete with its own copy of any class variables. Thing of a Class as a design spec, whi…
Popularity: 107
is an array with more than one dimension each dimension has different size ex: 10 20 30 11 22 22 33 44 77 88
Popularity: 72
Classes in Java inherit constructors from their parent classes. If you don't explicitly define a parent class, then Object is used, which has only the default empty constructor. That "default" constructor is only there when defined by the parent class, so classes which do not have a no-argument con…
Popularity: 140
Jar files are basically zip files, but they are supposed to store java classes, they have nothing to do with C.
Popularity: 134
Because, they are not methods to have a return type. The constructor by default creates an object of the class and that's all. It does not return any value, hence it has no return type. The above hints at the reason why constructors don't have a declared return type, but let's make it explicit: Cons…
Popularity: 129
There is no explicit limit, but the amount of your (virtual) memory does limit that.
Popularity: 98
It is also called as pretest loop.It executes the block of code after evaluation of condition in while statement.If evaluated answer is true,it will executes the block of code otherwise it will quit the loop.
Popularity: 154
It can have as many as you want. It allows you to catch very specific exceptions. -- Ac352 Answer Having more than one catch statement is a bad idea. A better approach is to analyze the error and go from their. Here is an example. Try My.Computer.FileSystem.DeleteFile("C:\TEST.txt") Catch ex As …
Popularity: 135
Data abstraction provides the skeleton or templates. That is it has no actual implementation.
Popularity: 94
Yes, in some way it's similar. One difference is that Java Bytecode is typically interpreted by the virtual machine, while MSIL is JIT-compiled to native machine code before executing. However, it is increasingly common for bytecode to be compiled as well.
Popularity: 122
To add a Character to a string, simply use concatenation. When adding to strings, the + sign concatinates. Example: String one = "This is a strin"; one = one +'g'; /*OUTPUT : This is a string */ Note, that if you intend to modify a string frequently, you should NOT be using the String class. T…
Popularity: 163
Bubble sort will be able to sort the items lexicographically, if you first assign the strings a relative value. The way strcmp in the C library does this is by returning the difference of the first different characters between the strings. For instance, if you call strcmp("Hello", "Highway"), strcmp…
Popularity: 147
The keyword static simply means that the method does not need to be assigned to an instance of an object. Because the main method is the first method executed, it is not attached to an instance.
Popularity: 91
Because they are created and destroyed on 'last-in-first-out' principle.
Popularity: 163
A default constructor is a constructor that takes no arguments. Here's a sample: class c{int a,b;c() //Constructor 1{a=2;b=1;}c(int x, int y) //Constructor 2{a=x;b=y;} }; Here, Constructor 1 is called the default constructor, while Constructor 2 is a parameterized constructor.
Popularity: 155
A class has only two possible types of members: data members (variables) and member functions. In the Java lexicography, class variables are called its Attributes, and all class functions are called Methods.
Popularity: 148
The exact same way you instantiate a class from any of the various Java libraries: by using the 'new' keyword. i.e MyClass A = new MyClass(); this forces the MyClass definition to run its Constructor method, and return an instance of object of type MyClass.
Popularity: 124
final is a keyword.it can be used for three posibilities. they are ->we can assign the variable as final. to declaring the variable as final to avoid the reusability of a variable. now i display small program for this type. class A { final int i=10; a(int b) { i=b; System.out.println(i…
Popularity: 124
method invoking refers to the action in which we call a Java method from within another java method or class. Method invocation is analogous to a function call in procedural programming.
Popularity: 140
'Main' is not at all associated with the return type. Specifying a function as main means that the function is to be executed first when the class is executed. A program can have only one 'main' function. Answer: The C standard ISO/IEC 9899 dictates that the return type of main() should be int. …
Popularity: 171
A class file is a compiled .java file and cannot be executed without jdk or java. They are often executed with .bat files in windows for convenience
Popularity: 127
"Overloading" a function means that you have multiple functions with the same name, but different signatures. The signature of a function is its return type and number/types of parameters. For example: void foo(int a, char b) can be distinguished from void foo() which can be distinguished from …
Popularity: 100
GUI stands for Graphical User Interface. The web browser in which you are viewing this website too can be considered a GUI to know more abt java i found out this amazing channel on youtube. its called as SLIDENEARD. Its a channel dedicated to java programming issues.i hope this helps your purpose.
Popularity: 155
1. Single Inheritance A Scenario where one class is inheriting/extending the behavior of just one super class. Ex: public class Ferrari extends Car {…} This can be taken much further, where one class is inheriting/extending the bahavior of another class which in turn is inheriting behavior f…
Popularity: 112
This depends on your handset. Certain devices are java-enabled, older ones are not.
Popularity: 135
Depends on the language. For C, no you don't. You can type blank brackets (int Arr[]) when declaring the array, or you can just use a pointer (int* Arr). Both will allow you to use the variable as an array without having to declare the specific size. Hope this answers your question. In Java, an arr…
Popularity: 95
A switch won't help you in drawing flowcharts, but there are flowcharts templates, witch do.
Popularity: 101