Advert

Java Compiler

Last edited by . Total of no comments in the discussion.

A Java compiler is a program which converts Java source code into Java bytecode. A basic Java compiler is included as part of the JDK (Java Development Kit). This Java compiler is called “javac”.              

Share on:

Bubble Sort

Last edited by . Total of no comments in the discussion.

It requires n-1 passes to sort an array. In each pass every element a[i] is compared with a[i+1], for i=0 to (n-k-1), where k is the pass number and if they are out of order i.e. if a[i]>a[i+1], they are swapped. This will cause the largest element to move up or bubble up. Thus after the end of the first pass the largest element in the array will be placed in the last or nth position and on the next pass, the next largest element will be placed at position Read More

Share on:

Call-By-Reference in Functions

Last edited by . Total of no comments in the discussion.

The call by reference uses a different mechanism. In place of passing value to the function, which is called, a reference to the original variable is passed. A reference is an alias for the predefined variable. That is, the value of that variable can be accessed by using any of the two: the original or the reference variable name. When a function is called by reference, then the formal parameters become reference to the actual parameters in the calling function. This means that, in call by reference method, the called Read More

Share on:

Conditional Operators and Switch Statements

Last edited by . Total of no comments in the discussion.

C++ has an operator that can be used as an alternative to an if-statement. This operator is called the conditional operator (?:). This operator can be used to replace an if-else statement of the following general form: if(expression) {      statements ;      –      – } else {      statements ;      –      – } The above form of if-else can be alternatively written using ?: as follows, expression1 ? expression2 : expression3 ; It works in the same way an if-statement executes. The execution is in the following manner, expression1 is evaluated If Read More

Share on:

javascript:void(0)

Last edited by . Total of 21 comments in the discussion.

javascript:void(0) is an error message that occasionally appears in a web browser when there is a problem loading a JavaScript from a webpage. Possible causes (and solutions) for the javascript:void(0) error message include: Problem Possible Resolution(s) A popup blocker blocking the JavaScript Disable the popup blocker A malfunctioning web proxy Disable the web proxy if possible An improperly written JavaScript Webmaster must rewrite the JavaScript JavaScript is not enabled Enable JavaScript Web browser JavaScript implementation is broken Switch or upgrade the web browser Programming with javascript:void(0) javascript:void(0) is used with Read More

Share on:

Virtual Functions

Last edited by . Total of no comments in the discussion.

Dynamic polymorphism allows programmers to write code using functions applied to objects of the base class without worrying about how those functions will actually be defined by derived classes. For instance, programmers might call functions on a Shape object that computes its area or perimeter, without concerning themselves with the actual (derived) type of the object, whether it is a Rectangle, Square or Circle. An essential requirement to take advantage of polymorphism in C++ is that there should be a way by which it is possible to refer to objects Read More

Share on:

Binary Tree – Searching a Node

Last edited by . Total of no comments in the discussion.

An element in a binary search tree can be searched very quickly. A search operation on binary tree is similar to applying binary search technique to a sorted linear array. The element to be searched will be first compared with root node. If it matches with the root node then the search terminates. Otherwise search is continued in the left sub tree if the element is less then the root or in the right sub tree if the element is greater then the root. Suppose we try to find a Read More

Share on:

Type Conversion – Basic to Class Type

Last edited by . Total of no comments in the discussion.

The conversion from basic to user defined data types can be done using constructors. Consider the following constructor: .cf { font-family: Lucida Console; font-size: 9pt; color: black; background: white; } .cl { margin: 0px; } .cb1 { color: green; } .cb2 { color: blue; } .cb3 { color: maroon; }   String :: String(char *a) { length = strlen(a); s = new char[length+1]; strcpy(s,a); }   The above constructor definition is used to construct a String type object from a char * type variable. The String class has two data Read More

Share on:

File Input/Output

Last edited by . Total of no comments in the discussion.

In C++, file input/output services are implemented through a component header file available C++ standard library. This header file is fstream.h . In C++, a file, at its lowest level, is interpreted simply as a sequence, or stream, of bytes. One aspect of the file I/O library manages the transfer of these bytes. At this level, the concept of a data type is absent. On the other hand, file, at the user level, consists of a sequence of possibly intermixed data types – characters, arithmetic values, class objects etc. A Read More

Share on:

What is the Difference Between ASP and PHP?

Last edited by . Total of no comments in the discussion.

While many computer users prefer to use HTML or the Javascipt programming language to write scripts for their applications, a computer guru may choose to use PHP or ASP to do the same thing. PHP and ASP are similar to each other but have several main differences that set them apart. For example, ASP is written and formatted differently than PHP is, although they provide many of the same functions. In this article, we will go over what ASP and PHP are, what ASP and PHP are used for, and Read More

Share on: