1) Base of hexadecimal number system? Answer : 16 2) Universal gate in digital logic? Answer : NAND 3) Memory type that is non-volatile? Answer : ROM 4) Basic building block of digital circuits? Answer : Gate 5) Device used for data storage in sequential circuits? Answer : Flip-flop 6) Architecture with shared memory for instructions and data? Answer : von Neumann 7) The smallest unit of data in computing? Answer : Bit 8) Unit that performs arithmetic operations in a CPU? Answer : ALU 9) Memory faster than main memory but smaller in size? Answer : Cache 10) System cycle that includes fetch, decode, and execute? Answer : Instruction 11) Type of circuit where output depends on present input only? Answer : Combinational 12) The binary equivalent of decimal 10? Answer : 1010 13) Memory used for high-speed temporary storage in a CPU? Answer : Register 14) Method of representing negative numbers in binary? Answer : Two's complement 15) Gate that inverts its input signal? Answer : NOT 16)...
Define class in Java
In java, a class is a template used to create object and define the data type. It acts as a building block for java language oriented systems. All java codes are defined in a class. A class has variables and methods.
Variables are attributes which define the state of class.
Methods are the place where the exact business logic has to be done. It contains a set of statements or instructions to satisfy the particular requirement.
Eg:
public class Addition // class name declaration
{
int a= 5; // variable declaration
int b= 5;
public void add()
{ // Method declaration
int c=a+b;
}
}
What do you mean by object ?
Object is a basic unit of Object oriented programming and represents the real life entities. A typical java program creates many objects, which interact each other by invoking methods. A java object is a combination of data and procedures working on the available data. An object has a state and behavior. The state of an object is stored in fields(variables),while methods (functions) displays the object behavior. Objects are created from templates known as classes. In java an object is created by using the keyword 'new'.
What is immutable object ?
Immutable object are java object whose object cannot be modified once created. Any modification in immutable object result in new object. For example String is immutable in java. Mostly immutable are also final in java, inorder to prevent sub class from over ridding methods in java which can compromise immutability. You can achieve same functionality by making members as non final but private and not modifying them except in constructor.