![]() |
|
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Moderator Join Date: Feb 2006
Posts: 1,413
Thanks: 0
Thanked 17 Times in 14 Posts
Rep Power: 20 | hello answer the following questions which wd be helpfull for java beginers /freshers.. Initially lets start with knowing simple fundas .. then we will also give practise examples later. 1 What is the difference between procedural and object-oriented programs?- 2 What is the difference between C++ and JAVA? 3 what is Object Oriented Programming Language Whats are its major benifits when compared to other languages like c, c++, .net? What are its disadvantages or limitations too? 4 What is object and how do u allocate memory to it? 5 What is the difference between METHODS and CONSTRUCTORS? Regards Suresh Kumar Team
__________________ http://livetolead.blogspot.com/ all the best Arise Awake N Stop Not Until Ur Goal Is Reached! |
| | |
| | #2 (permalink) |
| Moderator Join Date: Feb 2006
Posts: 1,413
Thanks: 0
Thanked 17 Times in 14 Posts
Rep Power: 20 | hello 1 What is the difference between procedural and object-oriented programs?- 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.
__________________ http://livetolead.blogspot.com/ all the best Arise Awake N Stop Not Until Ur Goal Is Reached! |
| | |
| | #3 (permalink) |
| Moderator Join Date: Feb 2006
Posts: 1,413
Thanks: 0
Thanked 17 Times in 14 Posts
Rep Power: 20 | hello Procedural ProgrammingProcedural programmingseparates the data of the program from the operations that manipulate the data. For example, if you want to send information across a network, only the relevant data is sent (see Figure 1), with the expectation that the program at the other end of the network pipe knows what to do with it. In other words, some sort of handshaking agreement must be in place between the client and server to transmit the data. In this model, no code is actually sent over the wire. OOP The fundamental advantage of OO programming is that the data and the operations that manipulate the data (the code) are both encapsulated in the object. For example, when an object is transported across a network, the entire object, including the data and behavior, goes with it. bye
__________________ http://livetolead.blogspot.com/ all the best Arise Awake N Stop Not Until Ur Goal Is Reached! |
| | |
| | #4 (permalink) |
| Moderator Join Date: Feb 2006
Posts: 1,413
Thanks: 0
Thanked 17 Times in 14 Posts
Rep Power: 20 | hello What is object and how do u allocate memory to it? Object is the instance of class .. u allocate memory thru new operator
__________________ http://livetolead.blogspot.com/ all the best Arise Awake N Stop Not Until Ur Goal Is Reached! |
| | |
| | #5 (permalink) |
| Moderator Join Date: Feb 2006
Posts: 1,413
Thanks: 0
Thanked 17 Times in 14 Posts
Rep Power: 20 | hello 5 What is the difference between METHODS and CONSTRUCTORS? A constructor is a member function of a class that is used to create objects of that class. It has the same name as the class itself, has no return type, and is invoked using the new operator. A method is an ordinary member function of a class. It has its own name, a return type (which may be void), and is invoked using the dot operator.
__________________ http://livetolead.blogspot.com/ all the best Arise Awake N Stop Not Until Ur Goal Is Reached! |
| | |
| | #6 (permalink) |
| Moderator Join Date: Feb 2006
Posts: 1,413
Thanks: 0
Thanked 17 Times in 14 Posts
Rep Power: 20 | HELLO Similarities and Differences C++ AND JAVA |
| | |
| | #7 (permalink) |
| Moderator Join Date: Feb 2006
Posts: 1,413
Thanks: 0
Thanked 17 Times in 14 Posts
Rep Power: 20 | hello this can also be the explanation ava can be used to create two types of programs: applications and applets. The output of a Java compiler is not executable code. Rather it is bytecode. Java run-time system is an interpreter for bytecode. It is simply a highly efficient means of encoding a program for interpretation. It is much easier to allow Java programs to run in a wide variety of environments. Once the run-time package exists for a given system, the bytecode version of any Java program can run on it. Therefore, using bytecode to represent programs is the easiest way to create truly portable programs. There are two surface similarities between Java and C++. First, Java uses a syntax similar to C++, such as the general forms of the for, while, and do loops. Second, Java supports object-oriented programming, same way as C++. There are also significant differences from C++, which fundamentally makes Java distinct from C++. Perhaps the single biggest difference between Java and C++ is that Java does not support pointers. Pointers are inherently insecure and troublesome. Since pointers do not exist in Java, neither does the -> operator. Some other C++ features are not found in Java. Java does not include structures or unions because the class encompasses these other forms. It is redundant to include them. Java does not support operator overloading. Java does not include a preprocessor or support the preprocessor directives. Java does not perform any automatic type conversions that result in a loss of precision. All the code in a Java program is encapsulated within one or more classes. Therefore, Java does not have global variables or global functions. Java does not support multiple inheritance. Java does not support destructors, but rather, add the finalize() function. Java does not have the delete operator. The << and >> are not overloaded for I/O operations. Java does not support templates. Java shares many similarities with C++ as it relates to classes, but there are also several differences. By default, members of a class are accessible by other members of their class, derived classes, and by other members of their package. Therefore, class members are “more public” than they are in C++, however, the private access specifier applies only to the variable or method that it immediately precedes. All class objects are instantiated in Java using the new operator. Therefore, all class objects are dynamically allocated. When there are no references to an object, then the object is considered inactive. Java includes two class-management features that help make using and organizing classes easier. The first is called a package, which defines a scope. Therefore, names declared inside a package are private to that package. Java uses file directories to store packages. Therefore, each package must be stored in a directory that has the same name as the package—including capitalization. Java, like C++, supports hierarchies of classes. However, the way that inheritance is implemented in Java differs substantially from the way that it is implemented in C++. Since multiple inheritance is not allowed in Java, then Java class hierarchies are linear. In Java, inheritance is referred to as subclassing. A base class in C++ is referred to as superclass in Java.
__________________ http://livetolead.blogspot.com/ all the best Arise Awake N Stop Not Until Ur Goal Is Reached! |
| | |
| | #8 (permalink) | |
| Unregistered
Posts: n/a
| Quote:
| |
|
| | #9 (permalink) | |
| Unregistered
Posts: n/a
| Quote:
| |
|
![]() |
| Tags |
| java , practice , question |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| More Interview Questions Here... |