SlideShare a Scribd company logo
1 of 9
8085 microprocessor questions
1. What are the various registers in 8085? - Accumulator register, Temporary register,
Instruction register, Stack Pointer, Program Counter are the various registers in 8085 .
2. In 8085 name the 16 bit registers? - Stack pointer and Program counter all have 16 bits.
3. What are the various flags used in 8085? - Sign flag, Zero flag, Auxillary flag, Parity
flag, Carry flag.
4. What is Stack Pointer? - Stack pointer is a special purpose 16-bit register in the
Microprocessor, which holds the address of the top of the stack.
5. What is Program counter? - Program counter holds the address of either the first byte
of the next instruction to be fetched for execution or the address of the next byte of a
multi byte instruction, which has not been completely fetched. In both the cases it gets
incremented automatically one by one as the instruction bytes get fetched. Also
Program register keeps the address of the next instruction.
6. Which Stack is used in 8085? - LIFO (Last In First Out) stack is used in 8085.In this
type of Stack the last stored information can be retrieved first.
7. What happens when HLT instruction is executed in processor? - The Micro
Processor enters into Halt-State and the buses are tri-stated.
8. What is meant by a bus? - A bus is a group of conducting lines that carriers data,
address, & control signals.
9. What is Tri-state logic? - Three Logic Levels are used and they are High, Low, High
impedance state. The high and low are normal logic levels & high impedance state is
electrical open circuit conditions. Tri-state logic has a third line called enable line.
10. Give an example of one address microprocessor? - 8085 is a one address
microprocessor.
11. In what way interrupts are classified in 8085? - In 8085 the interrupts are classified
as Hardware and Software interrupts.
12. What are Hardware interrupts? - TRAP, RST7.5, RST6.5, RST5.5, INTR.
13. What are Software interrupts? - RST0, RST1, RST2, RST3, RST4, RST5, RST6,
RST7.
14. Which interrupt has the highest priority? - TRAP has the highest priority.
15. Name 5 different addressing modes? - Immediate, Direct, Register, Register indirect,
Implied addressing modes.
16. How many interrupts are there in 8085? - There are 12 interrupts in 8085.
17. What is clock frequency for 8085? - 3 MHz is the maximum clock frequency for
8085.
18. What is the RST for the TRAP? - RST 4.5 is called as TRAP.
19. In 8085 which is called as High order / Low order Register? - Flag is called as Low
order register & Accumulator is called as High order Register.
20. What are input & output devices? - Keyboards, Floppy disk are the examples of input
devices. Printer, LED / LCD display, CRT Monitor are the examples of output devices.
21. Can an RC circuit be used as clock source for 8085? - Yes, it can be used, if an
accurate clock frequency is not required. Also, the component cost is low compared to
LC or Crystal.
22. Why crystal is a preferred clock source? - Because of high stability, large Q (Quality
Factor) & the frequency that doesn’t drift with aging. Crystal is used as a clock source
most of the times.
23. Which interrupt is not level-sensitive in 8085? - RST 7.5 is a raising edge-triggering
interrupt.
24. What does Quality factor mean? - The Quality factor is also defined, as Q. So it is a
number, which reflects the losses of a circuit. Higher the Q, the lower are the losses.
25. What are level-triggering interrupt? - RST 6.5 & RST 5.5 is level-triggering
interrupts.
x86 interview questions and answers
1. What is a Microprocessor? - Microprocessor is a program-controlled device, which
fetches the instructions from memory, decodes and executes the instructions. Most
Micro Processor are single- chip devices.
2. Give examples for 8 / 16 / 32 bit Microprocessor? - 8-bit Processor - 8085 / Z80 /
6800; 16-bit Processor - 8086 / 68000 / Z8000; 32-bit Processor - 80386 / 80486.
3. Why 8085 processor is called an 8 bit processor? - Because 8085 processor has 8 bit
ALU (Arithmetic Logic Review). Similarly 8086 processor has 16 bit ALU.
4. What is 1st / 2nd / 3rd / 4th generation processor? - The processor made of PMOS /
NMOS / HMOS / HCMOS technology is called 1st / 2nd / 3rd / 4th generation
processor, and it is made up of 4 / 8 / 16 / 32 bits.
5. Define HCMOS? - High-density n- type Complimentary Metal Oxide Silicon field effect
transistor.
6. What does microprocessor speed depend on? - The processing speed depends on
DATA BUS WIDTH.
7. Is the address bus unidirectional? - The address bus is unidirectional because the
address information is always given by the Micro Processor to address a memory
location of an input / output devices.
8. Is the data bus is Bi-directional? - The data bus is Bi-directional because the same bus
is used for transfer of data between Micro Processor and memory or input / output
devices in both the direction.
9. What is the disadvantage of microprocessor? - It has limitations on the size of data.
Most Microprocessor does not support floating-point operations.
10. What is the difference between microprocessor and microcontroller? - In
Microprocessor more op-codes, few bit handling instructions. But in Microcontroller:
fewer op-codes, more bit handling Instructions, and also it is defined as a device that
includes micro processor, memory, & input / output signal lines on a single chip.
11. What is meant by LATCH? - Latch is a D- type flip-flop used as a temporary storage
device controlled by a timing signal, which can store 0 or 1. The primary function of a
Latch is data storage. It is used in output devices such as LED, to hold the data for
display.
12. Why does microprocessor contain ROM chips? - Microprocessor contain ROM chip
because it contain instructions to execute data.
13. What is the difference between primary & secondary storage device? - In primary
storage device the storage capacity is limited. It has a volatile memory. In secondary
storage device the storage capacity is larger. It is a nonvolatile memory. Primary
devices are: RAM / ROM. Secondary devices are: Floppy disc / Hard disk.
14. Difference between static and dynamic RAM? - Static RAM: No refreshing, 6 to 8
MOS transistors are required to form one memory cell, Information stored as voltage
level in a flip flop. Dynamic RAM: Refreshed periodically, 3 to 4 transistors are
required to form one memory cell, Information is stored as a charge in the gate to
substrate capacitance.
15. What is interrupt? - Interrupt is a signal send by external device to the processor so as
to request the processor to perform a particular work.
16. What is cache memory? - Cache memory is a small high-speed memory. It is used for
temporary storage of data & information between the main memory and the CPU
(center processing unit). The cache memory is only in RAM.
17. What is called “Scratch pad of computer―? - Cache Memory is
scratch pad of computer.
18. Which transistor is used in each cell of EPROM? - Floating –gate
Avalanche Injection MOS (FAMOS) transistor is used in each cell of EPROM.
19. Differentiate between RAM and ROM? - RAM: Read / Write memory, High Speed,
Volatile Memory. ROM: Read only memory, Low Speed, Non Volatile Memory.
20. What is a compiler? - Compiler is used to translate the high-level language program
into machine code at a time. It doesn’t require special instruction to store in a
memory, it stores automatically. The Execution time is less compared to Interpreter.
21. Which processor structure is pipelined? - All x86 processors have pipelined structure.
22. What is flag? - Flag is a flip-flop used to store the information about the status of a
processor and the status of the instruction executed most recently
23. What is stack? - Stack is a portion of RAM used for saving the content of Program
Counter and general purpose registers.
24. Can ROM be used as stack? - ROM cannot be used as stack because it is not possible
to write to ROM.
25. What is NV-RAM? - Nonvolatile Read Write Memory also called Flash memory. It is
also known as shadow RAM.
Java interview questions and answers
1. What is garbage collection? What is the process that is responsible for doing that in
java? - Reclaiming the unused memory by the invalid objects. Garbage collector is
responsible for this process
2. What kind of thread is the Garbage collector thread? - It is a daemon thread.
3. What is a daemon thread? - These are the threads which can run without user
intervention. The JVM can exit when there are daemon thread by killing them abruptly.
4. How will you invoke any external process in Java? - Runtime.getRuntime().exec(….)
5. What is the finalize method do? - Before the invalid objects get garbage collected, the
JVM give the user a chance to clean up some resources before it got garbage collected.
6. What is mutable object and immutable object? - If a object value is changeable then
we can call it as Mutable object. (Ex., StringBuffer, …) If you are not allowed to change
the value of an object, it is immutable object. (Ex., String, Integer, Float, …)
7. What is the basic difference between string and stringbuffer object? - String is an
immutable object. StringBuffer is a mutable object.
8. What is the purpose of Void class? - The Void class is a uninstantiable placeholder
class to hold a reference to the Class object representing the primitive Java type void.
9. What is reflection? - Reflection allows programmatic access to information about the
fields, methods and constructors of loaded classes, and the use reflected fields, methods,
and constructors to operate on their underlying counterparts on objects, within security
restrictions.
10. What is the base class for Error and Exception? - Throwable
11. What is the byte range? -128 to 127
12. What is the implementation of destroy method in java.. is it native or java code? -
This method is not implemented.
13. What is a package? - To group set of classes into a single unit is known as packaging.
Packages provides wide namespace ability.
14. What are the approaches that you will follow for making a program very efficient?
- By avoiding too much of static methods avoiding the excessive and unnecessary use of
synchronized methods Selection of related classes based on the application (meaning
synchronized classes for multiuser and non-synchronized classes for single user) Usage
of appropriate design patterns Using cache methodologies for remote invocations
Avoiding creation of variables within a loop and lot more.
15. What is a DatabaseMetaData? - Comprehensive information about the database as a
whole.
16. What is Locale? - A Locale object represents a specific geographical, political, or
cultural region
17. How will you load a specific locale? - Using ResourceBundle.getBundle(…);
18. What is JIT and its use? - Really, just a very fast compiler… In this incarnation, pretty
much a one-pass compiler — no offline computations. So you can’t look at the whole
method, rank the expressions according to which ones are re-used the most, and then
generate code. In theory terms, it’s an on-line problem.
19. Is JVM a compiler or an interpreter? - Interpreter
20. When you think about optimization, what is the best way to find out the
time/memory consuming process? - Using profiler
21. What is the purpose of assert keyword used in JDK1.4.x? - In order to validate
certain expressions. It effectively replaces the if block and automatically throws the
AssertionError on failure. This keyword should be used for the critical arguments.
Meaning, without that the method does nothing.
22. How will you get the platform dependent values like line separator, path separator,
etc., ? - Using Sytem.getProperty(…) (line.separator, path.separator, …)
23. What is skeleton and stub? what is the purpose of those? - Stub is a client side
representation of the server, which takes care of communicating with the remote server.
Skeleton is the server side representation. But that is no more in use… it is deprecated
long before in JDK.
24. What is the final keyword denotes? - final keyword denotes that it is the final
implementation for that method or variable or class. You can’t override that
method/variable/class any more.
25. What is the significance of ListIterator? - You can iterate back and forth.
26. What is the major difference between LinkedList and ArrayList? - LinkedList are
meant for sequential accessing. ArrayList are meant for random accessing.
27. What is nested class? - If all the methods of a inner class is static then it is a nested
class.
28. What is inner class? - If the methods of the inner class can only be accessed via the
instance of the inner class, then it is called inner class.
29. What is composition? - Holding the reference of the other class within some other
class is known as composition.
30. What is aggregation? - It is a special type of composition. If you expose all the
methods of a composite class and route the method call to the composite method
through its reference, then it is called aggregation.
31. What are the methods in Object? - clone, equals, wait, finalize, getClass, hashCode,
notify, notifyAll, toString
32. Can you instantiate the Math class? - You can’t instantiate the math class. All the
methods in this class are static. And the constructor is not public.
33. What is singleton? - It is one of the design pattern. This falls in the creational pattern of
the design pattern. There will be only one instance for that entire JVM. You can achieve
this by having the private constructor in the class. For eg., public class Singleton {
private static final Singleton s = new Singleton(); private Singleton() { } public static
Singleton getInstance() { return s; } // all non static methods … }
34. What is DriverManager? - The basic service to manage set of JDBC drivers.
35. What is Class.forName() does and how it is useful? - It loads the class into the
ClassLoader. It returns the Class. Using that you can get the instance ( “class-
instance”.newInstance() ).
36. Inq adds a question: Expain the reason for each keyword of
public static void main(String args[])
J2EE interview questions and answers
1. What makes J2EE suitable for distributed multitier Applications?
- The J2EE platform uses a multitier distributed application model. Application logic is
divided into components according to function, and the various application components
that make up a J2EE application are installed on different machines depending on the
tier in the multitier J2EE environment to which the application component belongs. The
J2EE application parts are:
 Client-tier components run on the client machine.
 Web-tier components run on the J2EE server.
 Business-tier components run on the J2EE server.
 Enterprise information system (EIS)-tier software runs on the EIS server.
2. What is J2EE? - J2EE is an environment for developing and deploying enterprise
applications. The J2EE platform consists of a set of services, application programming
interfaces (APIs), and protocols that provide the functionality for developing
multitiered, web-based applications.
3. What are the components of J2EE application?
- A J2EE component is a self-contained functional software unit that is assembled into a
J2EE application with its related classes and files and communicates with other
components. The J2EE specification defines the following J2EE components:
A. Application clients and applets are client components.
B. Java Servlet and JavaServer Pages technology components are web components.
C. Enterprise JavaBeans components (enterprise beans) are business components.
D. Resource adapter components provided by EIS and tool vendors.
What do Enterprise JavaBeans components contain? - Enterprise JavaBeans
components contains Business code, which is logic
that solves or meets the needs of a particular business domain such as banking, retail, or
finance, is handled by enterprise beans running in the business tier. All the business
code is contained inside an Enterprise Bean which receives data from client programs,
processes it (if necessary), and sends it to the enterprise information system tier for
storage. An enterprise bean also retrieves data from storage, processes it (if necessary),
and sends it back to the client program.
Is J2EE application only a web-based? - No, It depends on type of application
that client wants. A J2EE application can be web-based or non-web-based. if an
application client executes on the client machine, it is a non-web-based J2EE
application. The J2EE application can provide a way for users to handle tasks such as
J2EE system or application administration. It typically has a graphical user interface
created from Swing or AWT APIs, or a command-line interface. When user request, it
can open an HTTP connection to establish communication with a servlet running in the
web tier.
Are JavaBeans J2EE components? - No. JavaBeans components are not
considered J2EE components by the J2EE specification. They are written to manage the
data flow between an application client or applet and components running on the J2EE
server or between server components and a database. JavaBeans components written for
the J2EE platform have instance variables and get and set methods for accessing the
data in the instance variables. JavaBeans components used in this way are typically
simple in design and implementation, but should conform to the naming and design
conventions outlined in the JavaBeans component architecture.
Is HTML page a web component? - No. Static HTML pages and applets are
bundled with web components during application assembly, but are not considered web
components by the J2EE specification. Even the server-side utility classes are not
considered web components, either.
What can be considered as a web component? - J2EE Web components can be
either servlets or JSP pages. Servlets are Java programming language classes that
dynamically process requests and construct responses. JSP pages are text-based
documents that execute as servlets but allow a more natural approach to creating static
content.
What is the container? - Containers are the interface between a component and
the low-level platform specific functionality that supports the component. Before a
Web, enterprise bean, or application client component can be executed, it must be
assembled into a J2EE application and deployed into its container.
What are container services? - A container is a runtime support of a system-
level entity. Containers provide components with services such as lifecycle
management, security, deployment, and threading.
What is the web container? - Servlet and JSP containers are collectively referred
to as Web containers. It manages the execution of JSP page and servlet components for
J2EE applications. Web components and their container run on the J2EE server.
What is Enterprise JavaBeans (EJB) container? - It manages the execution of
enterprise beans for J2EE applications.
Enterprise beans and their container run on the J2EE server.
What is Applet container? - Manages the execution of applets. Consists of a
Web browser and Java Plugin running on the client together.
How do we package J2EE components? - J2EE components are packaged
separately and bundled into a J2EE application for deployment. Each component, its
related files such as GIF and HTML files or server-side utility classes, and a
deployment descriptor are assembled into a module and added to the J2EE application.
A J2EE application is composed of one or more enterprise bean,Web, or application
client component modules. The final enterprise solution can use one J2EE application or
be made up of two or more J2EE applications, depending on design requirements. A
J2EE application and each of its modules has its own deployment descriptor. A
deployment descriptor is an XML document with an .xml extension that describes a
component’s deployment settings.
What is a thin client? - A thin client is a lightweight interface to the application
that does not have such operations like query databases, execute complex business rules,
or connect to legacy applications.
What are types of J2EE clients? - Following are the types of J2EE clients:
 Applets
 Application clients
 Java Web Start-enabled rich clients, powered by Java Web Start technology.
 Wireless clients, based on Mobile Information Device Profile (MIDP) technology.
What is deployment descriptor? - A deployment descriptor is an Extensible
Markup Language (XML) text-based file with an .xml extension that describes a
component’s deployment settings. A J2EE application and each of its modules has its
own deployment descriptor. For example, an enterprise bean module deployment
descriptor declares transaction attributes and security authorizations
for an enterprise bean. Because deployment descriptor information is declarative, it can
be changed without modifying the bean source code. At run time, the J2EE server reads
the deployment descriptor and acts upon the component accordingly.
What is the EAR file? - An EAR file is a standard JAR file with an .ear
extension, named from Enterprise ARchive file. A J2EE application with all of its
modules is delivered in EAR file.
What is JTA and JTS? - JTA is the abbreviation for the Java Transaction API.
JTS is the abbreviation for the Jave Transaction Service. JTA provides a standard
interface and allows you to demarcate transactions in a manner that is independent of
the transaction manager implementation. The J2EE SDK implements the transaction
manager with JTS. But your code doesn’t call the JTS methods directly. Instead, it
invokes the JTA methods, which then call the lower-level JTS routines. Therefore, JTA
is a high level transaction interface that your application uses to control transaction. and
JTS is a low level transaction interface and ejb uses behind the scenes (client code
doesn’t directly interact with JTS. It is based on object transaction service(OTS) which
is part of CORBA.
What is JAXP? - JAXP stands for Java API for XML. XML is a language for
representing and describing text-based data which can be read and handled by any
program or tool that uses XML APIs. It provides standard services to determine the type
of an arbitrary piece of data, encapsulate access to it, discover the operations available
on it, and create the appropriate JavaBeans component to perform those operations.
What is J2EE Connector? - The J2EE Connector API is used by J2EE tools
vendors and system integrators to create resource adapters that support access to
enterprise information systems that can be plugged into any J2EE product. Each type of
database or EIS has a different resource adapter. Note: A resource adapter is a
software component that allows J2EE application components to access and interact
with the underlying resource manager. Because a resource adapter is specific to its
resource manager, there is typically a different resource adapter for each type of
database or enterprise information system.
What is JAAP? - The Java Authentication and Authorization Service (JAAS)
provides a way for a J2EE application to authenticate and authorize a specific user or
group of users to run it. It is a standard Pluggable Authentication Module (PAM)
framework that extends the Java 2 platform security architecture to support user-based
authorization.
What is Java Naming and Directory Service? - The JNDI provides naming and
directory functionality. It provides applications with methods for performing standard
directory operations, such as associating attributes with objects and searching for
objects using their attributes. Using JNDI, a J2EE application can store and retrieve any
type of named Java object. Because JNDI is independent of any specific
implementations, applications can use JNDI to access multiple naming and directory
services, including existing naming and
directory services such as LDAP, NDS, DNS, and NIS.
What is Struts? - A Web page development framework. Struts combines Java
Servlets, Java Server Pages, custom tags, and message resources into a unified
framework. It is a cooperative, synergistic platform, suitable for development teams,
independent developers, and everyone between.
How is the MVC design pattern used in Struts framework? - In the MVC
design pattern, application flow is mediated by a central Controller. The Controller
delegates requests to an appropriate handler. The handlers are tied to a Model, and each
handler acts as an adapter between the request and the Model. The Model represents, or
encapsulates, an application’s business logic or state. Control is usually then forwarded
back through the Controller to the appropriate View. The forwarding can be determined
by consulting a set of mappings, usually loaded from a database or configuration file.
This provides a loose coupling between the View and Model, which can make an
application significantly easier to create and maintain. Controller: Servlet controller
which supplied by Struts itself; View: what you can see on the screen, a JSP page and
presentation components; Model: System state and a business logic JavaBeans.
Java keywords public static void main (String args[])
The public keyword is an access specifier, which allows the programmer to control the
visibility of class members. When a class member is preceded by public, then that
member may be accessed by code outside the class in which it is declared.
In this case, main( ) must be declared as public, since it must be called by code outside of
its class when the program is started.
The keyword static allows main( ) to be called without having to instantiate a particular
instance of the class. This is necessary since main( ) is called by the Java interpreter
before any objects are made. The keyword void simply tells the compiler that main( )
does not return a value. As you will see, methods may also return values.
As stated, main( ) is the method called when a Java application begins. Keep in mind that
Java is case-sensitive. Thus, Main is different from main. It is important to understand
that the Java compiler will compile classes that do not contain a main( ) method. But the
Java interpreter has no way to run these classes. So, if you had typed Main instead of
main, the compiler would still compile your program. However, the Java interpreter
would report an error because it would be unable to find the main( ) method.
Any information that you need to pass to a method is received by variables specified
within the set of parentheses that follow the name of the method. These variables are
called parameters. If there are no parameters required for a given method, you still need
to include the empty parentheses. In main( ), there is only one parameter, albeit a
complicated one. String args[ ] declares a parameter named args, which is an array of
instances of the class String. Objects of type String store character strings. In this case,
args receives any command-line arguments present when the program is executed.

More Related Content

What's hot

The 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsThe 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsmanishpatel_79
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkarSAQUIB AHMAD
 
Microprocessor and-interfacing-techbymak
Microprocessor and-interfacing-techbymakMicroprocessor and-interfacing-techbymak
Microprocessor and-interfacing-techbymakAkshay Makadiya
 
Microcontroller 8051 1
Microcontroller 8051  1Microcontroller 8051  1
Microcontroller 8051 1khan yaseen
 
LECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORSLECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORSDr.YNM
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086Waleed Khan
 
Lect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTURELect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTUREDr.YNM
 
Motorola 68hc11
Motorola 68hc11Motorola 68hc11
Motorola 68hc11gajani121
 
Micro Processor And Micro controller
Micro Processor And Micro controller Micro Processor And Micro controller
Micro Processor And Micro controller Raja pirian
 
Unit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsUnit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsDr. Pankaj Zope
 
M.sc I-sem-8086 notes
M.sc  I-sem-8086 notesM.sc  I-sem-8086 notes
M.sc I-sem-8086 notesDr.YNM
 
8086 Interrupts & With DOS and BIOS by vijay
8086 Interrupts &  With DOS and BIOS  by vijay8086 Interrupts &  With DOS and BIOS  by vijay
8086 Interrupts & With DOS and BIOS by vijayVijay Kumar
 
PIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESPIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESDr.YNM
 
The microprocessor and it's architecture
The microprocessor and it's architectureThe microprocessor and it's architecture
The microprocessor and it's architecturesamaa ali
 

What's hot (19)

The 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsThe 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systems
 
Unit 1
Unit 1Unit 1
Unit 1
 
Question Bank microcontroller 8051
Question Bank microcontroller 8051Question Bank microcontroller 8051
Question Bank microcontroller 8051
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkar
 
Microprocessor and-interfacing-techbymak
Microprocessor and-interfacing-techbymakMicroprocessor and-interfacing-techbymak
Microprocessor and-interfacing-techbymak
 
Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
 
Microcontroller 8051 1
Microcontroller 8051  1Microcontroller 8051  1
Microcontroller 8051 1
 
LECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORSLECT 1: ARM PROCESSORS
LECT 1: ARM PROCESSORS
 
Micro 8051
Micro 8051Micro 8051
Micro 8051
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
Lect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTURELect 4 ARM PROCESSOR ARCHITECTURE
Lect 4 ARM PROCESSOR ARCHITECTURE
 
Motorola 68hc11
Motorola 68hc11Motorola 68hc11
Motorola 68hc11
 
Micro Processor And Micro controller
Micro Processor And Micro controller Micro Processor And Micro controller
Micro Processor And Micro controller
 
Unit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsUnit II Study of Onchip Peripherals
Unit II Study of Onchip Peripherals
 
M.sc I-sem-8086 notes
M.sc  I-sem-8086 notesM.sc  I-sem-8086 notes
M.sc I-sem-8086 notes
 
8086 Interrupts & With DOS and BIOS by vijay
8086 Interrupts &  With DOS and BIOS  by vijay8086 Interrupts &  With DOS and BIOS  by vijay
8086 Interrupts & With DOS and BIOS by vijay
 
PIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESPIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTES
 
EE8551 MPMC
EE8551  MPMCEE8551  MPMC
EE8551 MPMC
 
The microprocessor and it's architecture
The microprocessor and it's architectureThe microprocessor and it's architecture
The microprocessor and it's architecture
 

Similar to Basic 8051 question

Similar to Basic 8051 question (20)

8085
80858085
8085
 
Microprocessor VIVA.pptx
Microprocessor VIVA.pptxMicroprocessor VIVA.pptx
Microprocessor VIVA.pptx
 
Ec 1303 microprocessor_its_applications
Ec 1303 microprocessor_its_applicationsEc 1303 microprocessor_its_applications
Ec 1303 microprocessor_its_applications
 
T-states in microprocessor 8085
T-states in microprocessor 8085T-states in microprocessor 8085
T-states in microprocessor 8085
 
MICROPROCESSOR_Notes.pptx
MICROPROCESSOR_Notes.pptxMICROPROCESSOR_Notes.pptx
MICROPROCESSOR_Notes.pptx
 
Important questions
Important questionsImportant questions
Important questions
 
Microprocessor interview questions
Microprocessor interview questionsMicroprocessor interview questions
Microprocessor interview questions
 
Viva
VivaViva
Viva
 
Microprocessor & Assembly language by team blackhole
Microprocessor & Assembly language by team blackholeMicroprocessor & Assembly language by team blackhole
Microprocessor & Assembly language by team blackhole
 
MP_MC.pdf
MP_MC.pdfMP_MC.pdf
MP_MC.pdf
 
Project report
Project reportProject report
Project report
 
Micro overview
Micro overviewMicro overview
Micro overview
 
8085 full discription
8085 full discription8085 full discription
8085 full discription
 
Microprocessor note
Microprocessor noteMicroprocessor note
Microprocessor note
 
Introduction to Microcontrollers
Introduction to MicrocontrollersIntroduction to Microcontrollers
Introduction to Microcontrollers
 
Digital Electronics & Fundamental of Microprocessor-II
Digital Electronics & Fundamental of Microprocessor-IIDigital Electronics & Fundamental of Microprocessor-II
Digital Electronics & Fundamental of Microprocessor-II
 
8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptx
8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptx8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptx
8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptx
 
Microcontroller overview 1
Microcontroller overview 1Microcontroller overview 1
Microcontroller overview 1
 
Qb microprocessors
Qb microprocessorsQb microprocessors
Qb microprocessors
 
Micro controller selection
Micro controller selectionMicro controller selection
Micro controller selection
 

More from Sourabh Bhattacharya (20)

Vhdl2
Vhdl2Vhdl2
Vhdl2
 
Vhdl
VhdlVhdl
Vhdl
 
Operational%20 amplifier
Operational%20 amplifierOperational%20 amplifier
Operational%20 amplifier
 
Mai506
Mai506Mai506
Mai506
 
M&i605
M&i605M&i605
M&i605
 
M&i
M&iM&i
M&i
 
Lica605
Lica605Lica605
Lica605
 
Lica506
Lica506Lica506
Lica506
 
Lica
LicaLica
Lica
 
Itc605
Itc605Itc605
Itc605
 
Itc
ItcItc
Itc
 
Vlsi707
Vlsi707Vlsi707
Vlsi707
 
Sms based wireless appliances control
Sms based wireless appliances controlSms based wireless appliances control
Sms based wireless appliances control
 
Energy merter
Energy merterEnergy merter
Energy merter
 
Comm network
Comm networkComm network
Comm network
 
132 kv seminar ppt
132 kv seminar ppt132 kv seminar ppt
132 kv seminar ppt
 
132 kv
132 kv132 kv
132 kv
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Matlab files
Matlab filesMatlab files
Matlab files
 
Matlab booklet
Matlab bookletMatlab booklet
Matlab booklet
 

Recently uploaded

What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 

Recently uploaded (20)

What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 

Basic 8051 question

  • 1. 8085 microprocessor questions 1. What are the various registers in 8085? - Accumulator register, Temporary register, Instruction register, Stack Pointer, Program Counter are the various registers in 8085 . 2. In 8085 name the 16 bit registers? - Stack pointer and Program counter all have 16 bits. 3. What are the various flags used in 8085? - Sign flag, Zero flag, Auxillary flag, Parity flag, Carry flag. 4. What is Stack Pointer? - Stack pointer is a special purpose 16-bit register in the Microprocessor, which holds the address of the top of the stack. 5. What is Program counter? - Program counter holds the address of either the first byte of the next instruction to be fetched for execution or the address of the next byte of a multi byte instruction, which has not been completely fetched. In both the cases it gets incremented automatically one by one as the instruction bytes get fetched. Also Program register keeps the address of the next instruction. 6. Which Stack is used in 8085? - LIFO (Last In First Out) stack is used in 8085.In this type of Stack the last stored information can be retrieved first. 7. What happens when HLT instruction is executed in processor? - The Micro Processor enters into Halt-State and the buses are tri-stated. 8. What is meant by a bus? - A bus is a group of conducting lines that carriers data, address, & control signals. 9. What is Tri-state logic? - Three Logic Levels are used and they are High, Low, High impedance state. The high and low are normal logic levels & high impedance state is electrical open circuit conditions. Tri-state logic has a third line called enable line. 10. Give an example of one address microprocessor? - 8085 is a one address microprocessor. 11. In what way interrupts are classified in 8085? - In 8085 the interrupts are classified as Hardware and Software interrupts. 12. What are Hardware interrupts? - TRAP, RST7.5, RST6.5, RST5.5, INTR. 13. What are Software interrupts? - RST0, RST1, RST2, RST3, RST4, RST5, RST6, RST7. 14. Which interrupt has the highest priority? - TRAP has the highest priority. 15. Name 5 different addressing modes? - Immediate, Direct, Register, Register indirect, Implied addressing modes. 16. How many interrupts are there in 8085? - There are 12 interrupts in 8085. 17. What is clock frequency for 8085? - 3 MHz is the maximum clock frequency for 8085. 18. What is the RST for the TRAP? - RST 4.5 is called as TRAP. 19. In 8085 which is called as High order / Low order Register? - Flag is called as Low order register & Accumulator is called as High order Register. 20. What are input & output devices? - Keyboards, Floppy disk are the examples of input devices. Printer, LED / LCD display, CRT Monitor are the examples of output devices. 21. Can an RC circuit be used as clock source for 8085? - Yes, it can be used, if an accurate clock frequency is not required. Also, the component cost is low compared to LC or Crystal.
  • 2. 22. Why crystal is a preferred clock source? - Because of high stability, large Q (Quality Factor) & the frequency that doesn’t drift with aging. Crystal is used as a clock source most of the times. 23. Which interrupt is not level-sensitive in 8085? - RST 7.5 is a raising edge-triggering interrupt. 24. What does Quality factor mean? - The Quality factor is also defined, as Q. So it is a number, which reflects the losses of a circuit. Higher the Q, the lower are the losses. 25. What are level-triggering interrupt? - RST 6.5 & RST 5.5 is level-triggering interrupts. x86 interview questions and answers 1. What is a Microprocessor? - Microprocessor is a program-controlled device, which fetches the instructions from memory, decodes and executes the instructions. Most Micro Processor are single- chip devices. 2. Give examples for 8 / 16 / 32 bit Microprocessor? - 8-bit Processor - 8085 / Z80 / 6800; 16-bit Processor - 8086 / 68000 / Z8000; 32-bit Processor - 80386 / 80486. 3. Why 8085 processor is called an 8 bit processor? - Because 8085 processor has 8 bit ALU (Arithmetic Logic Review). Similarly 8086 processor has 16 bit ALU. 4. What is 1st / 2nd / 3rd / 4th generation processor? - The processor made of PMOS / NMOS / HMOS / HCMOS technology is called 1st / 2nd / 3rd / 4th generation processor, and it is made up of 4 / 8 / 16 / 32 bits. 5. Define HCMOS? - High-density n- type Complimentary Metal Oxide Silicon field effect transistor. 6. What does microprocessor speed depend on? - The processing speed depends on DATA BUS WIDTH. 7. Is the address bus unidirectional? - The address bus is unidirectional because the address information is always given by the Micro Processor to address a memory location of an input / output devices. 8. Is the data bus is Bi-directional? - The data bus is Bi-directional because the same bus is used for transfer of data between Micro Processor and memory or input / output devices in both the direction. 9. What is the disadvantage of microprocessor? - It has limitations on the size of data. Most Microprocessor does not support floating-point operations. 10. What is the difference between microprocessor and microcontroller? - In Microprocessor more op-codes, few bit handling instructions. But in Microcontroller: fewer op-codes, more bit handling Instructions, and also it is defined as a device that includes micro processor, memory, & input / output signal lines on a single chip. 11. What is meant by LATCH? - Latch is a D- type flip-flop used as a temporary storage device controlled by a timing signal, which can store 0 or 1. The primary function of a Latch is data storage. It is used in output devices such as LED, to hold the data for display. 12. Why does microprocessor contain ROM chips? - Microprocessor contain ROM chip because it contain instructions to execute data.
  • 3. 13. What is the difference between primary & secondary storage device? - In primary storage device the storage capacity is limited. It has a volatile memory. In secondary storage device the storage capacity is larger. It is a nonvolatile memory. Primary devices are: RAM / ROM. Secondary devices are: Floppy disc / Hard disk. 14. Difference between static and dynamic RAM? - Static RAM: No refreshing, 6 to 8 MOS transistors are required to form one memory cell, Information stored as voltage level in a flip flop. Dynamic RAM: Refreshed periodically, 3 to 4 transistors are required to form one memory cell, Information is stored as a charge in the gate to substrate capacitance. 15. What is interrupt? - Interrupt is a signal send by external device to the processor so as to request the processor to perform a particular work. 16. What is cache memory? - Cache memory is a small high-speed memory. It is used for temporary storage of data & information between the main memory and the CPU (center processing unit). The cache memory is only in RAM. 17. What is called “Scratch pad of computer―? - Cache Memory is scratch pad of computer. 18. Which transistor is used in each cell of EPROM? - Floating –gate Avalanche Injection MOS (FAMOS) transistor is used in each cell of EPROM. 19. Differentiate between RAM and ROM? - RAM: Read / Write memory, High Speed, Volatile Memory. ROM: Read only memory, Low Speed, Non Volatile Memory. 20. What is a compiler? - Compiler is used to translate the high-level language program into machine code at a time. It doesn’t require special instruction to store in a memory, it stores automatically. The Execution time is less compared to Interpreter. 21. Which processor structure is pipelined? - All x86 processors have pipelined structure. 22. What is flag? - Flag is a flip-flop used to store the information about the status of a processor and the status of the instruction executed most recently 23. What is stack? - Stack is a portion of RAM used for saving the content of Program Counter and general purpose registers. 24. Can ROM be used as stack? - ROM cannot be used as stack because it is not possible to write to ROM. 25. What is NV-RAM? - Nonvolatile Read Write Memory also called Flash memory. It is also known as shadow RAM. Java interview questions and answers 1. What is garbage collection? What is the process that is responsible for doing that in java? - Reclaiming the unused memory by the invalid objects. Garbage collector is responsible for this process 2. What kind of thread is the Garbage collector thread? - It is a daemon thread. 3. What is a daemon thread? - These are the threads which can run without user intervention. The JVM can exit when there are daemon thread by killing them abruptly. 4. How will you invoke any external process in Java? - Runtime.getRuntime().exec(….) 5. What is the finalize method do? - Before the invalid objects get garbage collected, the JVM give the user a chance to clean up some resources before it got garbage collected.
  • 4. 6. What is mutable object and immutable object? - If a object value is changeable then we can call it as Mutable object. (Ex., StringBuffer, …) If you are not allowed to change the value of an object, it is immutable object. (Ex., String, Integer, Float, …) 7. What is the basic difference between string and stringbuffer object? - String is an immutable object. StringBuffer is a mutable object. 8. What is the purpose of Void class? - The Void class is a uninstantiable placeholder class to hold a reference to the Class object representing the primitive Java type void. 9. What is reflection? - Reflection allows programmatic access to information about the fields, methods and constructors of loaded classes, and the use reflected fields, methods, and constructors to operate on their underlying counterparts on objects, within security restrictions. 10. What is the base class for Error and Exception? - Throwable 11. What is the byte range? -128 to 127 12. What is the implementation of destroy method in java.. is it native or java code? - This method is not implemented. 13. What is a package? - To group set of classes into a single unit is known as packaging. Packages provides wide namespace ability. 14. What are the approaches that you will follow for making a program very efficient? - By avoiding too much of static methods avoiding the excessive and unnecessary use of synchronized methods Selection of related classes based on the application (meaning synchronized classes for multiuser and non-synchronized classes for single user) Usage of appropriate design patterns Using cache methodologies for remote invocations Avoiding creation of variables within a loop and lot more. 15. What is a DatabaseMetaData? - Comprehensive information about the database as a whole. 16. What is Locale? - A Locale object represents a specific geographical, political, or cultural region 17. How will you load a specific locale? - Using ResourceBundle.getBundle(…); 18. What is JIT and its use? - Really, just a very fast compiler… In this incarnation, pretty much a one-pass compiler — no offline computations. So you can’t look at the whole method, rank the expressions according to which ones are re-used the most, and then generate code. In theory terms, it’s an on-line problem. 19. Is JVM a compiler or an interpreter? - Interpreter 20. When you think about optimization, what is the best way to find out the time/memory consuming process? - Using profiler 21. What is the purpose of assert keyword used in JDK1.4.x? - In order to validate certain expressions. It effectively replaces the if block and automatically throws the AssertionError on failure. This keyword should be used for the critical arguments. Meaning, without that the method does nothing. 22. How will you get the platform dependent values like line separator, path separator, etc., ? - Using Sytem.getProperty(…) (line.separator, path.separator, …) 23. What is skeleton and stub? what is the purpose of those? - Stub is a client side representation of the server, which takes care of communicating with the remote server. Skeleton is the server side representation. But that is no more in use… it is deprecated long before in JDK.
  • 5. 24. What is the final keyword denotes? - final keyword denotes that it is the final implementation for that method or variable or class. You can’t override that method/variable/class any more. 25. What is the significance of ListIterator? - You can iterate back and forth. 26. What is the major difference between LinkedList and ArrayList? - LinkedList are meant for sequential accessing. ArrayList are meant for random accessing. 27. What is nested class? - If all the methods of a inner class is static then it is a nested class. 28. What is inner class? - If the methods of the inner class can only be accessed via the instance of the inner class, then it is called inner class. 29. What is composition? - Holding the reference of the other class within some other class is known as composition. 30. What is aggregation? - It is a special type of composition. If you expose all the methods of a composite class and route the method call to the composite method through its reference, then it is called aggregation. 31. What are the methods in Object? - clone, equals, wait, finalize, getClass, hashCode, notify, notifyAll, toString 32. Can you instantiate the Math class? - You can’t instantiate the math class. All the methods in this class are static. And the constructor is not public. 33. What is singleton? - It is one of the design pattern. This falls in the creational pattern of the design pattern. There will be only one instance for that entire JVM. You can achieve this by having the private constructor in the class. For eg., public class Singleton { private static final Singleton s = new Singleton(); private Singleton() { } public static Singleton getInstance() { return s; } // all non static methods … } 34. What is DriverManager? - The basic service to manage set of JDBC drivers. 35. What is Class.forName() does and how it is useful? - It loads the class into the ClassLoader. It returns the Class. Using that you can get the instance ( “class- instance”.newInstance() ). 36. Inq adds a question: Expain the reason for each keyword of public static void main(String args[]) J2EE interview questions and answers 1. What makes J2EE suitable for distributed multitier Applications? - The J2EE platform uses a multitier distributed application model. Application logic is divided into components according to function, and the various application components that make up a J2EE application are installed on different machines depending on the tier in the multitier J2EE environment to which the application component belongs. The J2EE application parts are:  Client-tier components run on the client machine.  Web-tier components run on the J2EE server.  Business-tier components run on the J2EE server.  Enterprise information system (EIS)-tier software runs on the EIS server.
  • 6. 2. What is J2EE? - J2EE is an environment for developing and deploying enterprise applications. The J2EE platform consists of a set of services, application programming interfaces (APIs), and protocols that provide the functionality for developing multitiered, web-based applications. 3. What are the components of J2EE application? - A J2EE component is a self-contained functional software unit that is assembled into a J2EE application with its related classes and files and communicates with other components. The J2EE specification defines the following J2EE components: A. Application clients and applets are client components. B. Java Servlet and JavaServer Pages technology components are web components. C. Enterprise JavaBeans components (enterprise beans) are business components. D. Resource adapter components provided by EIS and tool vendors. What do Enterprise JavaBeans components contain? - Enterprise JavaBeans components contains Business code, which is logic that solves or meets the needs of a particular business domain such as banking, retail, or finance, is handled by enterprise beans running in the business tier. All the business code is contained inside an Enterprise Bean which receives data from client programs, processes it (if necessary), and sends it to the enterprise information system tier for storage. An enterprise bean also retrieves data from storage, processes it (if necessary), and sends it back to the client program. Is J2EE application only a web-based? - No, It depends on type of application that client wants. A J2EE application can be web-based or non-web-based. if an application client executes on the client machine, it is a non-web-based J2EE application. The J2EE application can provide a way for users to handle tasks such as J2EE system or application administration. It typically has a graphical user interface created from Swing or AWT APIs, or a command-line interface. When user request, it can open an HTTP connection to establish communication with a servlet running in the web tier. Are JavaBeans J2EE components? - No. JavaBeans components are not considered J2EE components by the J2EE specification. They are written to manage the data flow between an application client or applet and components running on the J2EE server or between server components and a database. JavaBeans components written for the J2EE platform have instance variables and get and set methods for accessing the data in the instance variables. JavaBeans components used in this way are typically simple in design and implementation, but should conform to the naming and design conventions outlined in the JavaBeans component architecture. Is HTML page a web component? - No. Static HTML pages and applets are bundled with web components during application assembly, but are not considered web components by the J2EE specification. Even the server-side utility classes are not considered web components, either. What can be considered as a web component? - J2EE Web components can be either servlets or JSP pages. Servlets are Java programming language classes that dynamically process requests and construct responses. JSP pages are text-based documents that execute as servlets but allow a more natural approach to creating static content.
  • 7. What is the container? - Containers are the interface between a component and the low-level platform specific functionality that supports the component. Before a Web, enterprise bean, or application client component can be executed, it must be assembled into a J2EE application and deployed into its container. What are container services? - A container is a runtime support of a system- level entity. Containers provide components with services such as lifecycle management, security, deployment, and threading. What is the web container? - Servlet and JSP containers are collectively referred to as Web containers. It manages the execution of JSP page and servlet components for J2EE applications. Web components and their container run on the J2EE server. What is Enterprise JavaBeans (EJB) container? - It manages the execution of enterprise beans for J2EE applications. Enterprise beans and their container run on the J2EE server. What is Applet container? - Manages the execution of applets. Consists of a Web browser and Java Plugin running on the client together. How do we package J2EE components? - J2EE components are packaged separately and bundled into a J2EE application for deployment. Each component, its related files such as GIF and HTML files or server-side utility classes, and a deployment descriptor are assembled into a module and added to the J2EE application. A J2EE application is composed of one or more enterprise bean,Web, or application client component modules. The final enterprise solution can use one J2EE application or be made up of two or more J2EE applications, depending on design requirements. A J2EE application and each of its modules has its own deployment descriptor. A deployment descriptor is an XML document with an .xml extension that describes a component’s deployment settings. What is a thin client? - A thin client is a lightweight interface to the application that does not have such operations like query databases, execute complex business rules, or connect to legacy applications. What are types of J2EE clients? - Following are the types of J2EE clients:  Applets  Application clients  Java Web Start-enabled rich clients, powered by Java Web Start technology.  Wireless clients, based on Mobile Information Device Profile (MIDP) technology. What is deployment descriptor? - A deployment descriptor is an Extensible Markup Language (XML) text-based file with an .xml extension that describes a component’s deployment settings. A J2EE application and each of its modules has its own deployment descriptor. For example, an enterprise bean module deployment descriptor declares transaction attributes and security authorizations for an enterprise bean. Because deployment descriptor information is declarative, it can be changed without modifying the bean source code. At run time, the J2EE server reads the deployment descriptor and acts upon the component accordingly. What is the EAR file? - An EAR file is a standard JAR file with an .ear extension, named from Enterprise ARchive file. A J2EE application with all of its modules is delivered in EAR file. What is JTA and JTS? - JTA is the abbreviation for the Java Transaction API. JTS is the abbreviation for the Jave Transaction Service. JTA provides a standard
  • 8. interface and allows you to demarcate transactions in a manner that is independent of the transaction manager implementation. The J2EE SDK implements the transaction manager with JTS. But your code doesn’t call the JTS methods directly. Instead, it invokes the JTA methods, which then call the lower-level JTS routines. Therefore, JTA is a high level transaction interface that your application uses to control transaction. and JTS is a low level transaction interface and ejb uses behind the scenes (client code doesn’t directly interact with JTS. It is based on object transaction service(OTS) which is part of CORBA. What is JAXP? - JAXP stands for Java API for XML. XML is a language for representing and describing text-based data which can be read and handled by any program or tool that uses XML APIs. It provides standard services to determine the type of an arbitrary piece of data, encapsulate access to it, discover the operations available on it, and create the appropriate JavaBeans component to perform those operations. What is J2EE Connector? - The J2EE Connector API is used by J2EE tools vendors and system integrators to create resource adapters that support access to enterprise information systems that can be plugged into any J2EE product. Each type of database or EIS has a different resource adapter. Note: A resource adapter is a software component that allows J2EE application components to access and interact with the underlying resource manager. Because a resource adapter is specific to its resource manager, there is typically a different resource adapter for each type of database or enterprise information system. What is JAAP? - The Java Authentication and Authorization Service (JAAS) provides a way for a J2EE application to authenticate and authorize a specific user or group of users to run it. It is a standard Pluggable Authentication Module (PAM) framework that extends the Java 2 platform security architecture to support user-based authorization. What is Java Naming and Directory Service? - The JNDI provides naming and directory functionality. It provides applications with methods for performing standard directory operations, such as associating attributes with objects and searching for objects using their attributes. Using JNDI, a J2EE application can store and retrieve any type of named Java object. Because JNDI is independent of any specific implementations, applications can use JNDI to access multiple naming and directory services, including existing naming and directory services such as LDAP, NDS, DNS, and NIS. What is Struts? - A Web page development framework. Struts combines Java Servlets, Java Server Pages, custom tags, and message resources into a unified framework. It is a cooperative, synergistic platform, suitable for development teams, independent developers, and everyone between. How is the MVC design pattern used in Struts framework? - In the MVC design pattern, application flow is mediated by a central Controller. The Controller delegates requests to an appropriate handler. The handlers are tied to a Model, and each handler acts as an adapter between the request and the Model. The Model represents, or encapsulates, an application’s business logic or state. Control is usually then forwarded back through the Controller to the appropriate View. The forwarding can be determined by consulting a set of mappings, usually loaded from a database or configuration file. This provides a loose coupling between the View and Model, which can make an
  • 9. application significantly easier to create and maintain. Controller: Servlet controller which supplied by Struts itself; View: what you can see on the screen, a JSP page and presentation components; Model: System state and a business logic JavaBeans. Java keywords public static void main (String args[]) The public keyword is an access specifier, which allows the programmer to control the visibility of class members. When a class member is preceded by public, then that member may be accessed by code outside the class in which it is declared. In this case, main( ) must be declared as public, since it must be called by code outside of its class when the program is started. The keyword static allows main( ) to be called without having to instantiate a particular instance of the class. This is necessary since main( ) is called by the Java interpreter before any objects are made. The keyword void simply tells the compiler that main( ) does not return a value. As you will see, methods may also return values. As stated, main( ) is the method called when a Java application begins. Keep in mind that Java is case-sensitive. Thus, Main is different from main. It is important to understand that the Java compiler will compile classes that do not contain a main( ) method. But the Java interpreter has no way to run these classes. So, if you had typed Main instead of main, the compiler would still compile your program. However, the Java interpreter would report an error because it would be unable to find the main( ) method. Any information that you need to pass to a method is received by variables specified within the set of parentheses that follow the name of the method. These variables are called parameters. If there are no parameters required for a given method, you still need to include the empty parentheses. In main( ), there is only one parameter, albeit a complicated one. String args[ ] declares a parameter named args, which is an array of instances of the class String. Objects of type String store character strings. In this case, args receives any command-line arguments present when the program is executed.