Explain about 3-tier architecture in Java
A three-tier architecture is any system which enforces a general separation between the following three parts: 1. Client Tier or user interface 2. Middle Tier or business logic 3. Data Storage Tie...
middle tier is primarly based on processing the bussiness logic. The main idea of dividing into tiers is like the application developer can concentrate on specific tier in developing webapplicati...
How will you make sure to develop Java/j2ee projects/applications secured from hackers?Justify how Java projects are more secured than other languages?
Java projects are more secured than other languages because after compilation of java program byte code is generated. And byte code is unreadable code. Any person cant read the byte code. then the project become more secure.
J2EE application can be made secure by implementing: 1. Authentication 2. Authorization 3. Encrypt the information by making the transport guarantee as Confidential. Authentication verifies if the us...
Why Java soft has declared httpservlet class as an abstract class?Is there any performance issue?
In httpservlet class there is no any abstract method although Javasoft declared this class as an abstract class.Ok,this is valid in Java.So if we want to utilize this class we will have to extends this class.But we can use to achieve this one by using httpservlet class as simple Java class also.
Security Purpose
Why pointer concept not use in Java?
java does not support pointer because of security purpose, as if it have pointer then till easy to find out the addressing of its application which may make it unsecure
java uses the concept of reference variable which is same as pointer....
Difference between Java.Sql.Date and Java.Util.Date
java.util.date is used to show date and time of the system
java.sql.date is used to show the date of retrieved data from database and also it shows entered date to database
Explanation: public class ((java.util.Date extends java.lang.Object)) implements java.io.Serializ able,java.lang.Cloneable,java.lang.Comparable java.sql.Date extends the java.uti.Date cls obj so jav...
What is bit twiddling in Java?
Bit Twiddling was used in earlier days for efficiency. It is a technique used for bit manipulation. Java bitwise and bit shift operators such as NOT, AND, OR, XOR, LEFT-SHIFT, RIGHT-SHIFT, UNSIGNED-RI...
Available methods in synchronization ?
In this two threads cannot use the same resource simultaneously beacuse the thread execution gets interrupted or terminated hence only a single thread can share resource at a time.
It is a process of ensuring that if two or more threads are using a shared resource then only one thread get access to that shared resource at a time.
Synchronization contains empty implementation, so no method is used.
What is the difference b/w Java & Javax files?
Java is the extension of C++ language and javax files are those where it stores the entire program for execution in the form of files and termed as javax files
javax is the extension for the java packages
Code
javax.swing extension for java.awt
What is diffrence between Java and Java script?
Java is the basic object oriented programmng language and Java script can be used in style sheets making and in HTML documentation
java-script is also same as like java only.But java is used in server side scripting and the javascript is used in client side scripting. I will say a real time scenario here consider the normal user...
Can we declare class as protected?
What is the scope for this class?
Answered by: dipl. ing. Dan
Member Since Mar-2006 | Answered On : Mar 24th, 2006
Some people might get confused by the many posts. The correct answer to the question "can we declare class as protected?" is YES, BUT only as an inner class. A 'normal' class cannot be protected or private.
// 'Normal' class - only default or public allowed
public class ProtectedOrNot {
// Inner class - public, default, protected, private allowed
protected class InnerClass {
}
public static void main(String[] args) {
}
}
The class cannot be declared as protected..
we can not declare a class as protected or private compiler will gives an error like ; xyz.java:1: modifier protected not allowed here protected class xyz{ ^ 1 error
Code
protected class xyz{ }
Why is that the final variable has to be initialized as soon as it is declare?
Answered by: r.praveenkumar
Member Since Oct-2007 | Answered On : Aug 1st, 2008
when a variable is declared as final we cant change its value again. we use final variable to declare a constant so when we declare a variable as final and if we were allowed to not to give its value at the time of declaration it would not make sense so people who designed java made mandatory to give the value when we declare a final variable. then only it will be sensible.
final PI=3.14;
then we cant change PI's value. think if the above statement do not contain a vl it would not make sense.
A variable can be declared but when program execution is running one can change its variable but when it reaches a final result the varable cannot be changed..hence it is declared as final variable
when a variable is declared as final we cant change its value again. we use final variable to declare a constant so when we declare a variable as final and if we were allowed to not to give its value ...
Explain the concept of design in a project and its life cycle
Projects needs to be designed carefully which must be meaningful according to the readers and learners..It must be planned in such a way so that it can be followed easily a project should contain a meaninngful data related to topic prescribed
Let me start with an example.Consider a development projectInitiation : Requirements gatheringPlanning : From the scratch to the end product based of the needs and requirements provided.Design: Once t...
DAO decides to recieve the appropriate application from java and implemeting it a runtime...during execution..
DAO is Data Access Object.
anyone pls send me project architecture diagram. and plz differentiate project architecture and project approach briefly. Does project architecture follows project approach.
Is project architecture is same for all struts, spring etc for all. or different architectures for all. pls tell me
Can anyone send me project architecture diagram. and plz differentiate project architecture and project approach briefly. Does project architecture follows project approach.
Can we declare class as priVATe?What will happen if we declare like that?
yes.But we can not declare the outer class as private..If did so,the compiler will generate the error as the modifier private is not allowed here,but we can declare the inner class as private.
Not true, the class can be accessed by an outer-class.
Java single inhertiance and multiple inheritance
1.What is meant by inheritance,single inhertiance,multiple inheritance?2.Define abstract class & abstract method?3.How to developed and delopying a servelt,JSP program in the tomcat apache server,weblogic server?Plz send the answer for the particular abo
Java supports single inheritance like C++, but does not supports multiple inheritance because of diamond problem.
In Java multiple inheritance means implementing the multiple interface, at the same time you can inherit only one class and implement multiple interface.
What is design by contract? Explain the assertion construct?
In every class or method, there will be a calling function and a called function.When ever a function(calling function) calls another function(called function), the called function is expected to repl...
Let me tell you where exactly it is used and what it does as per my knowledge.Application library used by OpenOffice.org, an open-source productivity suite; contains the functionality for the componen...
Suppose you have a very large queue, and you need to do a insert and delete on the queue. Since the queue is very large , you cannot keep the entire queue in the memory. How do you go about implementing such a condition?How do you go about inserting and deleting elements from that queue if you cannot...
Problems with large Queue :1) Space.2) Inserting and deleting.3) Time to perform operations.4) Additional cost.There are few ways to implement very large queues:1)Using flat-files:A "flat file&qu...
Java Patterns Interview Questions
JAR - Java ARchive Its a file format based on the ZIP file format and similar to ZIP format this is also used for aggregating many files (many be of different types) into one aggregate file. This agg...
jar files: These files are with the .jar extension. The .jar files contain the libraries, resources and accessories files like property files. .war files: These files are with the .war extension. Th...