Which of the following declare an array of string objects? (select multiple)
A) string[ ] s;b) string [ ]s:c) string[ s]:d) string s[ ]:
What are the types of exceptions in Java?
There are two types
1.Checked
2.Unchecked
Unchecked exceptions are you are not understood at compile time. It is a critical problem for the user.
The concept of polymorphism is often expressed by the phrase
Skill/topic: awt & appletsa) one interface, multiple methodsb) multiple interface, one methodc) multiple interface, multiple methodd) one interface, one method
B
The concept of polymorphism is often expressed by ...
Single Interface, Multiple methods
Java was initially called as _____
A) oak
No. Java was intially called "Green".
This is correct answers
Oak
State true or false :- a class is a template for multiple objects with similar features.
A) trueb) false
True
true
Java was conceived by james gosling, patrick naughton, chris warth, ed frank, and mike sheridan
A) trueb) false
Yes its true.
The statement is True
A) it must have a package statementb) it must be named test.Javac) it must import Java.Langd) it must declare a public class named test
A) It must have a package statement
hi, offcourse it is B.when file is complied ,it is save as .java extention...thanku....
Swing provides ________ text components
Skill/topic: awt & appletsa) fourb) sixc) sixteen d) thirtytwo
B) Six
Swing provides six text components.All of Swing's text components inherit from the same superclass, JTextComponent.
- Himanshu
Can we call the main function explicitly? If yes, how?
Thats an excellent question. Try this, It works. Because main() is a static method. So, We can call static methods from another class static method. ClassB { public static void main(String[] args) { ...
what is meant by encapsulation ? Explain with an example
Protective wrapper that prevents the code and data from being arbitrarily accessed by the other code defined outside the wrapper.
Binding of data and methods into a single unit is called encapsulation.
There are _____ types of comments in Java
A) one b) two c) threed) four explanation: there are 3 types of comments namely single-line, multi-line and documentation comment
4
Three
Convert list object to map object
How to convert list object in to map object?
List
Map
for (Item i : list) map.put(i.getKey(),i);
How many ways to create an object in Java??? Plz give an example.
Only 4 ways.
1) Class c=new Class(); -->Using new operator
2) Class.forName("Class"); -->Using class.forName
3) NumberFormat object=NumberFormat.getNumberInstance(); -->Using Factory methods
4) Class c=new Class();
Class c2=(Class)c.clone(); -->using Cloning
1.newInstance()
2.static factory()
3.InstanceFactory()
4.factoryPattern()
5.deserialization
6clonning
7.new keyword.
packages is nothing but Classes and Interfaces and sub-packages.
Sub-packages is nothing but Classes and Interfaces and sub-sub-packages.
A package is a container which consists of classes and interfaces.
How do I write a module to keep count of the amount of guesses it takes to guess the number correctly?
what is meant by a wrapper class
wrapper classes are the base class for the primitive datatypes.To be accessed as objects;
wrapper classes are used to be able to use primitive datatypes as objects...............
another informative thing is;
there are 8 wrapper classes in J2EE
is there any tool in Java that can create reports
java is a platform independent and pure object oriented programming language. the java programs mainly developed for embedded system application.
JasperReports is a powerful open source Java reporting tool that has the ability to deliver rich content onto the screen, to the printer or into PDF, HTML, XLS, CSV and XML files.
Check this link out http://java-source.net/open-source/charting-and-reporting/jasperreports
How to compress a string (algorithem)?
"java import java.io.ByteArrayOutputStream; java.io.IOException; import java.util.zip.GZIPOutputStream; import java.util.zip.*; public class zipUtil{ public static String compress...
How to convert bytecode to sourcecode?
A Java Decompiler (JD) can convert back the Bytecode (the .class file) into the source code (the .java file).
How to avoid deadlock in Java?
A deadlock occurs when one thread has the control for A and tries to get the control for B while another thread has the control for B and tries to get the control for A. Each will wait forever for the...
d
d