| Back to Questions Page |
| |
| Question |
What is JasperReports? |
Rank |
Answer Posted By |
|
Question Submitted By :: Sharlynm |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Jasper Reports is used to Generate the reports from the
Database. A powerful report-generating tool that has the
ability to deliver rich content onto the screen, to the
printer or into PDF, HTML, XLS, CSV and XML files.  |
| Vinod Reddy |
| |
| |
| Question |
how convert java file to jar files?
|
Rank |
Answer Posted By |
|
Question Submitted By :: Vikneswarank |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | by just putting .jar extension  |
| Fds |
| |
| |
| Answer | As far as I am aware about jar files, they are used to
archive the class files and not java files...
If you want to create a jar file for class files, you can
use following command:
cmd:\> jar cvf <name>.jar .
where (.) is for the current directory.  |
| Uv [Jadian] |
| |
| |
|
|
| |
| Question |
what about static? |
Rank |
Answer Posted By |
|
Question Submitted By :: Vikneswarank |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Static is a keyword in java,
static means only one copy exists for entire class
irrespective of the number of objects that exists for that
class.
The static variables are initialized when the class is
loaded and the non-static variables are initialized just
before the constructor is called.  |
| Satyanarayana M |
| |
| |
| Question |
what is diff between Access modifier and specifier? |
Rank |
Answer Posted By |
|
Question Submitted By :: Vikneswarank |
| This Interview Question Asked @ L&T |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | access specifiers will specify the scope of the members of
access
public,protected,private,default.
access modifiers will support the functionality of a method.
abstract,final,native,synchronized,static,volatile.  |
| Raveesha |
| |
| |
| Question |
what is disadvantage of thread? |
Rank |
Answer Posted By |
|
Question Submitted By :: Vikneswarank |
| This Interview Question Asked @ HCL |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Threads also have some disadvantages:
Threads are not reusable as they are dependent on a process
and cannot be separated from the process.
Threads are not isolated as they don't have their own
address space.
The error cause by the thread can kill the entire process
or program because that error affects the entire memory
space of all threads use in that process or program.
Due to the shared resources by the threads with in the
process can also affect the whole process or program when a
resource damage by the thread.
For concurrent read and write access to the memory thread
will required synchronizations. Data of the process can
easily damage by the thread through data race because all
the threads with in the process have write access to same
piece of dat  |
| Nag~1417 |
| |
| |
| Question |
what is stringBuffer and StringBuilder? |
Rank |
Answer Posted By |
|
Question Submitted By :: Vikneswarank |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | String is immutable whereas StringBuffer and StringBuilder
can change their values.
The only difference between StringBuffer and StringBuilder
is that StringBuilder is unsynchronized whereas
StringBuffer is synchronized. So when the application needs
to be run only in a single thread then it is better to use
StringBuilder. StringBuilder is more efficient than
StringBuffer.
Criteria to choose among String, StringBuffer and
StringBuilder
If your text is not going to change use a string Class
because a String object is immutable.
If your text can change and will only be accessed from a
single thread, use a StringBuilder because StringBuilder is
unsynchronized.
If your text can changes, and will be accessed from
multiple threads, use a StringBuffer because StringBuffer
is synchronous.  |
| Anonymous |
| |
| |
| Question |
advantage of thread? |
Rank |
Answer Posted By |
|
Question Submitted By :: Vikneswarank |
| This Interview Question Asked @ HCL |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | our lines of code can be executed by many requests at a
time, this is the main advantage of the thread.
but the performance will slow down, so threading will be
used where it's needed.  |
| Gaurav Agrawal |
| |
| |
| Answer | basically You can make best use of your CPU, by ensuring that its always processing some or the other things. And threading makes the execution faster not slower as it divides the whole work into chunks and processes them parallel. finally unites then to give result. correct me if I am wrong.  |
| Vinay [Jadian] |
| |
| |
| Answer | Thread is a small part of a program when a program enter in the executed state threads will be execute concurrently and maximum use of cpu.  |
| Mohit Tyagi [Jadian] |
| |
| |
| Question |
what is difference between checked exception & unchecked
exception in java? |
Rank |
Answer Posted By |
|
Question Submitted By :: Vikneswarank |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Java runtime exception handler
can not catch all type of exceptions. As such we need
to explicitly deal with them to prevent abrupt program
termination.Some of the examples for this could be
ArrayIndexOutOfBounds, ArithmeticExceptions etc. The
key factor to remember is that checked exceptions are
the ones where we need to use the try and catch blocks
to get the exception problem solved. The same is not
mandatory for the unchecked exceptions and are caught
well and good by the Java run time Exception Handler  |
| Vikneswarank |
| |
| |
| Question |
Give me simple example of hibernate caching and explain the
details of caching????? thanks in adv. |
Rank |
Answer Posted By |
|
Question Submitted By :: Ragini3 |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | caching concept in hibernate is performed internally in
stages...
1)firstlevel(Session) caching
2)Secondlevel(SessionFactory) caching
1)firstlevel(Session) caching:
First-level cache always Associates with the Session
object. Hibernate uses this cache by default. Here, it
processes one transaction after another one, means wont
process one transaction many times. Mainly it reduces the
number of SQL queries it needs to generate within a given
transaction. That is instead of updating after every
modification done in the transaction, it updates the
transaction only at the end of the transaction.
2)Secondlevel(SessionFactory) caching
Second-level cache always associates with the Session
Factory object. While running the transactions, in between
it loads the objects at the Session Factory level, so that
those objects will available to the entire application,
don’t bounds to single user. Since the objects are already
loaded in the cache, whenever an object is returned by the
query, at that time no need to go for a database
transaction. In this way the second level cache works.  |
| Imambasha |
| |
| |
| Question |
how we can implement interface in jsp ? |
Rank |
Answer Posted By |
|
Question Submitted By :: Smrutiranjan_sahoo |
| This Interview Question Asked @ Google |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | A JSP page can't directly implement an interface. If you
really need to do this you'll have to define a superclass
for your page which implements the interface. If you
declare this superclass to be abstract you can defer the
implementation of the interface to the JSP page. This
superclass will have to implement the interfaces
HttpJspPage and Servlet too, otherwise you will get a
compilation error from the JSP compiler.  |
| Rahul |
| |
| |
| Question |
important features of java which differenciate it from c++ |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Java is apure object-oriented progrmaing language.here one
beter feature we have i.e multiple inheritance and pointer
concepets are not used.
In java the primitivw datatypes like(int,float,double,short)
these values can be represented in objects of classes.  |
| Sureshyadav |
| |
| |
| Answer | there are following diff between java and c++
1) one of the most important diff is there is no pointre in
java but pointer is hidden from programmer.
2) java is pure object oriented programming language where
as c++ is not pure object oriented language is also support
c feature.
3) in java everything should be within class includin main
function where as it can be in calss or not.
4) java doesn't support operator overloading where as c++
souuprt
5)there is no global variable in java where as it is in c++
6) there is no distructor in java but threr is finally key
work
7)there is no multipal inharitance but is can be achived by
interface  |
| Kumod Kumar |
| |
| |
| Question |
How u validate date in DD/MM/YY format. and how u validate
money in ur jsp |
Rank |
Answer Posted By |
|
Question Submitted By :: Smrutiranjan_sahoo |
| This Interview Question Asked @ Tomax , Satyam Computers |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Locale locale = Locale.GERMANY;
String string =
NumberFormat.getCurrencyInstance(locale).format(123.45);  |
| Test |
| |
| |
| Answer | you can use java regex pattern matchers to achieve that.  |
| Sushant |
| |
| |
| Question |
when we applied start()method on a thread ,how does it know
that to execute run()method on that object? |
Rank |
Answer Posted By |
|
Question Submitted By :: Ravurivinod |
| This Interview Question Asked @ HCL |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | When start method is called , JVM calls run method of this
object  |
| Suma |
| |
| |
| Answer | Thread in a java inbuilt Object.
So if you are implementing threads in your system by using
Thread class or runnable interface, the JVM will look at
that and keep an eye on your code. As soon as you call the
start method it will go and call the run method on its own.
The funda here is that this is something that the JVM if
fully responsible of handling.  |
| Sushant |
| |
| |
|
| |
|
Back to Questions Page |