Java 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.
Total questions 24300
Supervisors Become a Supervisor
Recent Activity
Contributor
wrote the first answer to First name of java before oak 19 Jun 2013 02:44
Hilmarz (supervisor) [4543]
wrote the first answer to What is java program that can display hello world 18 Jun 2013 22:52
Dynotech (supervisor) [4296]
added What is java program that can display hello world to Java Programming 18 Jun 2013 12:48
Hilmarz (supervisor) [4543]
wrote the first answer to What is statement and blocks 18 Jun 2013 00:21
Top Contributors this month
Current Leaders
Hall of Fame
Questions
What are user defined exceptions in Java?
There could be a exception which cannot reach the user as it looks, instead it could be replaced by some other exceptions. In...
Popularity: 273 • Tools: Recategorize
Explain the usage of JPanel with example?
JPanel is a general purpose container used to organize and manage the groups of related components. It is a light weight...
Popularity: 238 • Tools: Recategorize
What is the difference between the JVM and JRE?
JRE includes (JVM ) java virtual machine and some other library files. That runs a java application. JVM - understand the...
Popularity: 223 • Tools: Recategorize
How do you code a program to find kaprekar number?
import java.io.*;class kaprekar { public static void main(String args[])throws IOException { BufferedReader br=new...
Popularity: 171 • Tools: Recategorize
What is the default return type of main?
'Main' is not at all associated with the return type. Specifying a function as main means that the function is to be executed...
Popularity: 171 • Tools: Recategorize
Write a java program to create a shopping bill?
import java.io.*; class ShopReceipt { protected static void main()throws IOException { BufferedReader in=new...
Popularity: 170 • Tools: Recategorize
How to add a character to a string in java?
To add a Character to a string, simply use concatenation. When adding to strings, the + sign concatinates. Example: String one...
Popularity: 163 • Tools: Recategorize
Why are local variable stored on stack?
Because they are created and destroyed on 'last-in-first-out' principle.
Popularity: 163 • Tools: Recategorize
Which data type in Java is the largest?
Among the primitive data types - float and double are the largest. Data TypeBits UsedMinimum ValueMaximum Valuebyte8-2727 -...
Popularity: 155 • Tools: Recategorize
What is meant bu GUI in Java?
GUI stands for Graphical User Interface. The web browser in which you are viewing this website too can be considered a GUI to...
Popularity: 155 • Tools: Recategorize
What is importance of static variable?
The static modifier tells the system that this particular variable belongs to the class and does not belong to any specific...
Popularity: 155 • Tools: Recategorize
What type of loop is the while loop?
It is also called as pretest loop.It executes the block of code after evaluation of condition in while statement.If evaluated...
Popularity: 154 • Tools: Recategorize
Is java machine dependent?
Yes, since it can only play in some computers and not all computers can read it. Every Java application needs a minimum system...
Popularity: 153 • Tools: Recategorize
Why do we use double in java but do not use float?
Double is more precise than float. The 4 bytes saved on a float are usually not very relevant. However, if you need to save large...
Popularity: 153 • Tools: Recategorize
What is reference data types in java?
A reference variable is used to refer to (or access) an object. A reference variable is declared to be of a specific type and...
Popularity: 153 • Tools: Recategorize
What is a sample of default constructor?
A default constructor is a constructor that takes no arguments. Here's a sample: class c{int a,b;c() //Constructor...
Popularity: 152 • Tools: Recategorize
Why java file name and public class name be same?
Because that is how Java file naming conventions are designed. The rules for naming files in Java are as follows: • There can...
Popularity: 151 • Tools: Recategorize
What is the name of java interpreter?
That one is called "Java Virtual Machine".
Popularity: 150 • Tools: Recategorize
What is NoSuchMethodFound Exception in java?
It means that you have tried to use a method which doesn't exist.
Popularity: 149 • Tools: Recategorize
Is Two method cannot have same name in java?
Two methods can have the same name provided their signature is different. Ex: public int add(int a, int b){ ... } public int...
Popularity: 148 • Tools: Recategorize
Who is James Arthur Gosling biography?
He is the father of the Java programming language.
Popularity: 147 • Tools: Recategorize
Is it possible to use the bubble sort algorithm to sort strings?
Bubble sort will be able to sort the items lexicographically, if you first assign the strings a relative value. The way strcmp in...
Popularity: 147 • Tools: Recategorize
What is the advantage of overriding a class?
In object oriented programming language, it is possible to override classes. and the advantage over this is we can just show the...
Popularity: 146 • Tools: Recategorize
Explain the different access modifiers in Java?
An Access Modifier is a key word in java that determines what level of access or visibility a particular java variable/method or...
Popularity: 144 • Tools: Recategorize
Which language is easy to learn java and c sharp?
C# and Java have many similaries. If you learn one, you won't have much of a problem learning the other.
Popularity: 144 • Tools: Recategorize
Write a java program to find weather a given string is a palindrome or not?
//call this method inputing the string you want to testprivate void palindromeTest(String input){String output = """+input+"" ";...
Popularity: 143 • Tools: Recategorize
How are objects stored in stack and heap in java?
• Instance variables and objects live on the heap. • Local variables live on the stack. Let's take a look at a Java...
Popularity: 143 • Tools: Recategorize
What is rules of accessibility in java?
The rules of accessibility are governed by the access modifiers. An Access Modifier is a key word in java that determines what...
Popularity: 143 • Tools: Recategorize
What is class member in java?
A class has only two possible types of members: data members (variables) and member functions. In the Java lexicography, class...
Popularity: 141 • Tools: Recategorize
Can two variables refer to the same object?
Yes. If you simply write: x = new SomeClass(); y = x; will make the variable y refer to the same object that variable x is...
Popularity: 140 • Tools: Recategorize
Why Java always provides a default constructor to class when you use an other constructor default constructor remove?
Classes in Java inherit constructors from their parent classes. If you don't explicitly define a parent class, then Object is...
Popularity: 140 • Tools: Recategorize
What is mean by method invoking in java?
method invoking refers to the action in which we call a Java method from within another java method or class. Method invocation...
Popularity: 140 • Tools: Recategorize
What does java code look like?
Below is a simple example- the function of the code below is to print out the words "Hello" "world" to the screen. public class...
Popularity: 139 • Tools: Recategorize
Some important features of java programming?
The important features of Java are the ones that relate to the object oriented concepts like: a. Inheritance b. ...
Popularity: 139 • Tools: Recategorize
How class accomplish data hiding?
Data hiding is one of the important aspects of a class. Data hiding means to hide the members of the class and providing the...
Popularity: 137 • Tools: Recategorize
Do overridden methods have the same signature?
Yes. Overridden methods have the same signature whereas Overloaded methods have a different signature
Popularity: 137 • Tools: Recategorize
What is mean by Classes and Objects?
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...
Popularity: 136 • Tools: Recategorize
How do you install a network for a group of family computers?
I'll answer assuming you're using Windows based machines. The absolute easiest way is to buy a Router or Switch from a company...
Popularity: 135 • Tools: Recategorize
Can abstract method be declared as final in java?
No. An abstract method must be overriden in an subclass. If the method is final then it can't be edited.
Popularity: 135 • Tools: Recategorize
Can a try block have more than one catch block?
It can have as many as you want. It allows you to catch very specific exceptions. -- Ac352 Answer Having more than one catch...
Popularity: 135 • Tools: Recategorize
Can you override method in the same class?
You cannot override a method inside the same class. If you do that, it is called Overloading. Experienced java programmers can...
Popularity: 135 • Tools: Recategorize
Why object Serialization needed in java?
Imagine you want to save the state of one or more objects. If Java didn't have serialization, you'd have to use one of the I/O...
Popularity: 135 • Tools: Recategorize
What is the token method?
Tokenizing is the process of taking big pieces of source data, breaking them into little pieces, and storing the little pieces in...
Popularity: 135 • Tools: Recategorize
How can run java application on android?
This depends on your handset. Certain devices are java-enabled, older ones are not.
Popularity: 135 • Tools: Recategorize
How do you convert c file to jar file?
Jar files are basically zip files, but they are supposed to store java classes, they have nothing to do with C.
Popularity: 134 • Tools: Recategorize
Is abstract data type a structured data type?
Abstract is not a datatype but a modifier. Abstract can be used in 2 places:Methods: If a method is termed abstract it means that...
Popularity: 134 • Tools: Recategorize
What is the difference between Java and the C programming language?
Java is pure object oriented programming language than c++, it uses the concepts of Classes, Objects, Inheritance, Polymorphism....
Popularity: 133 • Tools: Recategorize
How can you automate the posting of rotating images from your computer to a website using Java?
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...
Popularity: 131 • Tools: Recategorize
How do you write a working key listener in java that responds to an 'enter'?
Almost all controls' ActionListener triggers the actionPerformed upon the enter key press Using an anonymous class...
Popularity: 129 • Tools: Recategorize
Why constructor does not have return type?
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...
Popularity: 129 • Tools: Recategorize
What is difference between core Java and advanced Java?
Core Java has to do with the basic package of Java objects that are typically used for general desktop applications. These...
Popularity: 127 • Tools: Recategorize
How class file is created in java?
A class file is a compiled .java file and cannot be executed without jdk or java. They are often executed with .bat files in...
Popularity: 127 • Tools: Recategorize
What is over abstraction?
Over abstraction, in computer programming terms, means that you use inheritance too often in your code. If you look for any two...
Popularity: 126 • Tools: Recategorize
How you can sort vector in Java?
Remember that the Vector class is a subclass of AbstractList. Also remember that the Collections class has an efficient sorting...
Popularity: 124 • Tools: Recategorize
Can a method be declared in any order in a class?
Yes. There is no specific order in which the compiler expects methods to be present. As long as the method is inside the class it...
Popularity: 124 • Tools: Recategorize
How do you instantiate self created class in java?
The exact same way you instantiate a class from any of the various Java libraries: by using the 'new' keyword. i.e MyClass A =...
Popularity: 124 • Tools: Recategorize
When do you declare method or class final?
final is a keyword.it can be used for three posibilities. they are ->we can assign the variable as final. to declaring the...
Popularity: 124 • Tools: Recategorize
In Which Language JVM is written?
As there are more than one JVM implementations, there is not a single language used to implement them all. Off the top of my...
Popularity: 123 • Tools: Recategorize
Explain the need of package in java?
This is a way to organize files when a project consists of multiple modules. It also helps resolve naming conflicts when...
Popularity: 122 • Tools: Recategorize
How do you open a class file?
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...
Popularity: 122 • Tools: Recategorize
Is MSIL similar to java byte code?
Yes, in some way it's similar. One difference is that Java Bytecode is typically interpreted by the virtual machine, while MSIL...
Popularity: 122 • Tools: Recategorize
Is Float to float casting in java possible?
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...
Popularity: 118 • Tools: Recategorize
When casting is needed in java?
Implicit casting is done automatically by the compiler and virtual machine. Explicit casting is needed to convert types of data...
Popularity: 118 • Tools: Recategorize
What is mean by parse in java?
It is used to convert the value of one datatype into a value of another datatype. Example- Integer.parseInt(in.readLine); It...
Popularity: 115 • Tools: Recategorize
What is single inheritance and multi inheritance?
1. Single Inheritance A Scenario where one class is inheriting/extending the behavior of just one super class. Ex: public class...
Popularity: 112 • Tools: Recategorize
How does a string tokenizer work?
String tokenizer is a utility feature in Java language that is used to split a string into multiple pieces based on a delimiter....
Popularity: 109 • Tools: Recategorize
What is the meaning of instantiate in java?
Instantiate means to create an actual instance of a Class. That is, the creation of an Object of that Class. This allocates...
Popularity: 107 • Tools: Recategorize
What do you mean when you say that Java has two concepts?
You are talking about the implementation point view of Abstract class and the interface. Let's go. 1. Interface helps Multiple...
Popularity: 105 • Tools: Recategorize
What is function overloading in oop?
"Overloading" a function means that you have multiple functions with the same name, but different signatures. The signature of a...
Popularity: 100 • Tools: Recategorize
How many objects can you create from one class in Java?
There is no explicit limit, but the amount of your (virtual) memory does limit that.
Popularity: 98 • Tools: Recategorize
What kind of programs can be written in java?
I will assume that you mean in a broad spectrum in this answer. Java is intended to be a cross-platform full programming...
Popularity: 97 • Tools: Recategorize
Why is Java not a pure OOP Language?
Java is a OOP language and it is not a pure Object Based Programming Language. Many languages are Object Oriented. There are...
Popularity: 96 • Tools: Recategorize
What is the programming language used for e-banking?
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...
Popularity: 96 • Tools: Recategorize
Is it necessary to give the size of array?
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...
Popularity: 95 • Tools: Recategorize
Full form of Java?
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 • Tools: Recategorize
What is data abstraction in oops?
Data abstraction provides the skeleton or templates. That is it has no actual implementation.
Popularity: 94 • Tools: Recategorize
What is dynamic binding in java?
Dynamic Binding means declaring variables at run time only rather than declaring it at compile time.
Popularity: 93 • Tools: Recategorize
What is main thread in java program?
the main thread is the first thread that creates when the JVM starts executing your program. All subsequent threads that you may...
Popularity: 93 • Tools: Recategorize
What is a subclass in java?
A subclass in Java is a class that inherits features from a parent class. class Car { public void goForADrive() { ...
Popularity: 93 • Tools: Recategorize
Why servlet is faster than jsp?
The speed difference is not usually significant, but the slight performance advantage goes to Servlets because, JSPs get...
Popularity: 93 • Tools: Recategorize
Why main method is static?
The keyword static simply means that the method does not need to be assigned to an instance of an object. Because the main method...
Popularity: 91 • Tools: Recategorize
The importance of inheritance in object oriented programming?
Inheritance is an object oriented feature supported by Java wherein the features of one Java class can be inherited/made...
Popularity: 88 • Tools: Recategorize
Why would you want to use user defined exception handling?
sometimes there are situations where the program is vary long which can make error debugging a long process so java provides a...
Popularity: 87 • Tools: Recategorize
Java applet program to draw national flag?
import java.io.*; import java.applet.*; import java.awt.*; public class flag extends Applet { public void paint(Graphics g) ...
Popularity: 87 • Tools: Recategorize
What does 'user defined content' mean?
not an actual code line you need to redefine the script
Popularity: 87 • Tools: Recategorize
Is JVM available on every machine?
Yes - In every machine that has the Java Runtime Environment (JRE) installed, the JVM will be available.
Popularity: 85 • Tools: Recategorize
How do you print all data in a Binary Search Tree?
By using Depth First Search or Breadth First search Tree traversal algorithm we can print data in Binary search tree.
Popularity: 83 • Tools: Recategorize
What is taught as the beginning computer language at many colleges and universities?
c
Popularity: 83 • Tools: Recategorize
Java program to check A is divisible by B?
Implement this method: public static boolean isDivisible(int a, int b) { if(a % b == 0) { return true; } else { return...
Popularity: 82 • Tools: Recategorize
Can anyone suggest topics for 10th ICSE computer projects?
my self is a computer teacher,from my point of view ,some project topics are: BANKINGONLINE QUIZBILL Preperationticket...
Popularity: 80 • Tools: Recategorize
Can you restart stopped thread in java?
No. Once a thread is stopped you cannot restart it.
Popularity: 79 • Tools: Recategorize
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...
Popularity: 77 • Tools: Recategorize
How does the Java programming language work?
Java uses a code-compiler, which does not create a machine-code, like normal Windows programs, but a byte-code, which the Java...
Popularity: 76 • Tools: Recategorize
Why the container is an abstract class?
container class contains some abstract methods that are implemented in its subclasses that's why the container is an abstract
Popularity: 75 • Tools: Recategorize
What is similarities between interface and class?
The similarities are:a. They are both java basic object typesb. They both can contain variables and methods (With difference...
Popularity: 75 • Tools: Recategorize
What does static mean in java?
The static keyword associated with a method or a variable in java specifies that the entity belongs to the class and not any...
Popularity: 74 • Tools: Recategorize
How JVM does garbage collection?
The JVM is responsible for running all the java programs. It is also responsible for keeping the memory utilization of the system...
Popularity: 74 • Tools: Recategorize
Click here to browse the new [Java Programming questions] or [All unanswered Java Programming questions].