Q1.What is the difference between procedural and object-oriented programs?
Ans: The difference between procedural and object-oriented programs are
a) In procedural program, programming logic follows certain procedures and the instructions are executed one after another. In OOP program, unit of program is object, which is nothing but combination of data and code
b) In procedural program, data is exposed to the whole program whereas in OOPs program, it is accessible with in the object and which in turn assures the security of the code.
Q2.What are Encapsulation, Inheritance and Polymorphism?
Ans: Encapsulation is the mechanism that binds together code and data it manipulates and keeps both safe from outside interference and misuse.
Inheritance is the process by which one object acquires the properties of another object.
Polymorphism is the feature that allows one interface to be used more than one calss.In other world we can say polymorphism is a reusability of object in more than one class.
Q3.What is the difference between Assignment and Initialization?
Ans:Assignment can be many times as desired whereas initialization can be only once.
Q4.W hat is OOPs?
Ans: Object oriented programming organizes a program around its data, i. e. , objects and a set of well defined interfaces to that data. An object-oriented program can be characterized as data controlling access to code.
Q5.What are Class, Constructor and Primitive data types?
Ans: Class is a template for multiple objects with similar features and it is a blue print for objects. It defines a type of object according to the data the object can hold and the operations the object can perform.
Constructor is a special kind of method that determines how an object is initialized when created. The name of constructor is same as class name. Primitive data types are 8 types and they are: byte, short, int, long, float, double, Boolean, char.
Q6.What is an Object and how do you allocate memory to it?
Ans: Object is an instance of a class and it is a software unit that combines a structured set of data with a set of operations for inspecting and manipulating that data. The object is created by using new keyword. When an object is created using new operator, memory is allocated to it.
Q7.What is the difference between constructor and method?
Ans: Constructor will be automatically invoked when an object is created whereas method has to be called explicitly by using dot(.) operator .
Q8:What are methods and how are they defined?
Ans: Methods are functions that operate on instances of classes in which they are defined. By use of the method objects can communicate with each other and can call methods in other classes. Method definition has four parts. They are name of the method, type of object or primitive type the method returns, a list of parameters and the body of the method. A method’s signature is a combination of the first three parts mentioned above.
Q9:What is the use of bin and lib in JDK?
Ans: Bin contains all tools such as javac, appletviewer, awt tool, etc., whereas lib contains API and all packages.
Q10: What is casting?
Ans: Casting is process of convert the value of one type to another.
Q11: How many ways can an argument be passed to a subroutine and explain them?
Ans: An argument can be passed in two ways. They are passing by value and passing by reference.
Passing by value: This method copies the value of an argument into the formal parameter of the subroutine.
Passing by reference: In this method, a reference to an argument (not the value of the argument) is passed to the parameter.
Q12:What is the difference between an argument and a parameter?
Ans: At time of defining method, variables passed in the method are called parameters
At time of using those methods, values passed to those variables are called arguments.
Subscribe to:
Post Comments (Atom)
Archives
-
▼
2008
(201)
-
▼
April
(137)
- Q & A on Teoretical ANalysis of Router Systems
- Q & A on Application Level Gateways,
- Q & A on Ethernet Transceivers and "10BaseT",
- Q & A on 100BaseT and 10BaseT Cabling,
- Q & A on One LAN or Many LANs on a Campus,
- Q & A on ICMP and UDP "ping",
- Q & A on Netweork Analyzer Software,
- Q & A on Writing a Network Analyzer,
- Q & A on Interpreting IP Addresses in Octal,
- Q & A on New Top-Level Domains for DNS,
- Q & A on WAP and TCP.
- Q & A on TCP Segment Lengths.
- Q & A on TCP/IP Between Hosts on a Single Network.
- Q & A on "Internetworking with TCP/IP, Volume 1".
- Q & A on TPC/IP Layering Model,
- Q & A on IP Address Prefixes and Suffixes
- Q & A on "Net 0" IP Addresses.
- Q & A on Network Standard Byte Order and User Data.
- Q & A on Network Topologies,
- Q & A on Code for Internetworking with TCP/IP, Vol...
- Q & A on Attenuation in Ethernet Network Design
- Q & A on Hardware Technologies
- Computer Network Questions and Answers Part 1
- Computer Network Questions and Answers Part 2.
- Computer Network Questions and Answers Part 3.
- Computer Network Questions and Answers Part 4.
- Computer Network Questions and Answers Part 5,
- Computer Network Questions and Answers Part 6.
- Computer Network Questions and Answers Part 7.
- Computer Network Questions and Answers Part 8.
- Computer Network Questions and Answers Part 9,
- networking 146
- Basic Networkin Questions - 2, 142
- Basic Networkin Questions - 1 140
- Networking, Socket Programming, Inter-Process Comm...
- Networking Interview questions 134
- Networking Interview questions 130
- Computer Networking Interview Questions 128
- Networking Interview Questions 126
- JAVA QUESTIONS 125
- JAVA INTERVIEW QUESTIONS 120
- Core Java Test Paper1 116
- Java Interview Questions And Answers 112
- Java Interview Questions And Answers 108
- Advanced enterprise Java interview questions 106
- Advanced JAVA questions 104
- (FAQ) Advanced Java Interview Questions 100
- TrainJava Blog interviews 98
- Java Exceptions Questions 94
- Java technical interview guide - part 1 90
- Advanced Java Interview Questions And Answers 88
- Java J2EE Interview Questions and Answers 84
- Java Architect Interview Questions 82
- Advanced enterprise Java Interview Questions 80
- java script interview questions 78
- importent java interviews and answers
- importent study interview questions in java 74
- java total interview questions 68
- java interviews 66
- importent java interview questions 64
- java importent studying questions
- core java importent interviews 62
- corejava 60
- interviews of corejava 58
- corejava interviews 54
- core java more interviews 52
- core java inerviews 51
- core java interview questions 50
- corejava 50
- Core Java Interview Questions and Answers 48
- Core Java Interview Questions and Answers 46
- 300 Core java interview questions And Answer 44
- Java Interview Questions and Answers 40
- Java Interview Questions and Answers 34
- Java Interview Questions and Answers 32
- Java Interview Questions and Answers 30
- Java Interview Questions and Answers 28
- java interview questions 26
- java importent interview questions 24
- Java and Perl Web programming interview questions 23
- java interview questions 22
- Basic Java interview question 16
- Some Java Job Interview Questions 15
- Java Technical Questions with Answers 14
- Table of Contents:
- Visual Basic Interview Questions 13
- Java Interview Questions... 12
- Advanced enterprise Java Interview Questions
- Advanced Java Programming Interview Questions 10
- java questions 9
- Advanced Java Interview Questions 8
- Java interview questions 7
- JAVA INTERVIEW QUESTIONS (5)
- JAVA INTERVIEW QUESTIONS (4)
- JAVA INTERVIEW QUESTIONS (3)
- JAVA INTERVIEW QUESTIONS (2)
- JAVA INTERVIEW QUESTIONS 1
- Core Java Interview Questions books
- core java importent questions
- 30 simple Java questions
-
▼
April
(137)
4 comments:
Very useful questions for those who want to start their career in networking. Share more like this.
ccna institute in Chennai | ccna Training center in Chennai | Best CCNA Training Institute in Chennai | ccna certification in Chennai ccna course in Tambaram | ccna course in Adyar
Interesting post. Excellent thought, highly inspiring. Waiting for your future blogs.
Primavera Training in Chennai
Primavera Course in Chennai
Primavera Training Institute in Chennai
Primavera Training in Tambaram
Hadoop Admin Training in Chennai
Hadoop Administration Training in Chennai
Drupal Training in Chennai
Drupal Certification Training
A debt of gratitude is in order for choosing an opportunity to talk about this, I feel incredible about it and love considering more on this theme. It is to a great degree supportive for me.
Cyber Security Training Course in Chennai | Certification | Cyber Security Online Training Course | Ethical Hacking Training Course in Chennai | Certification | Ethical Hacking Online Training Course |
Thanks for this blog. It is very useful.
Java training in Pune
Post a Comment