what is virtual function in java?
964100
object-oriented programming, a virtual function or virtual method is a function whose behavior, by virtue of being declared "virtual", is determined by the definition of a function with the same signature furthest in the inheritance lineage of the instantiated object on which it is called. This concept is a very important part of the polymorphism portion of object-oriented programming (OOP).\n\n\nThe concept of the virtual function solves the following problem:\n\nIn OOP when a derived class inherits from a base class, an object of the derived class may be referred to (or cast) as either being the base class type or the derived class type. If there are base class functions overridden by the derived class, a problem then arises when a derived object has been cast as the base class type. When a derived object is referred to as being of the base's type, the desired function call behavior is ambiguous.\n\nThe distinction between virtual and not virtual is provided to solve this issue. If the function in question is designated "virtual" then the derived class's function would be called (if it exists). If it is not virtual, the base class's function would be called.
201573
void anyfun(void);\nvoid anyfun();\n\nTechnically, the above are the same. The compiler will assume an empty parameter list to mean (void). Thus, the above are the same. Style-wise, the latter of the two is preferred for C++ programming.\n\nvoid anyfun(void);\nanyfun();\n\nThe compiler will assume you want to have no parameters, but it will also *assume* you will return a value of type "int". The compiler will have to do something for the return since you did not specify a type, and it chooses int as the return type for the function. This is just not good style and should be avoided in all cases.\n\nvoid anyfun(void);\nanyfun(void);\n\nAgain, the compiler is going to respect your (void) parameter list, but will supply the default "int" return type. This should be avoided in all cases. It is always good style and proper programming practice to *always* specify the return type of a function, especially if you don't intend to reutrn anything.\n\nYour first function declaration:\n\nvoid anyfun(void);\n\nis the best style and most commonly accepted style-wise. Always specify the return type of a function. Parameters are optional and () is proper style in C++ if you don't have parameters.
1173379
Hmm .. unless it's really new, I've never heard of 'virtual' basic.  Maybe "Visual" basic,\n\nhttp://www.google.com/search?num=100&hl=en&lr=&safe=off&rls=GGLR%2CGGLR%3A2005-49%2CGGLR%3Aen&q=%22visual+basic%22+tutorial
34440
its a software that is used to emulate a pc running an Operating System.  Kind of like running two OS on the same computer at the same time.  Let me quote microsoft's product information\n\n"Virtual PC is a powerful software virtualization solution that allows you to run multiple PC-based operating systems simultaneously on one workstation..."\n\nsome more information, from wikipedia:\n\n"Virtual PC is an emulation suite for Apple Mac OS X, and a virtualization suite for Microsoft Windows operating systems. The software was originally written by Connectix, and was subsequently acquired by Microsoft."
254565
If you've never used an object-oriented language before, you need to understand the underlying concepts before beginning to write code. You need to know what an object is, what a class is, how objects and classes are related, and how objects communicate by using messages.\n\nObject-oriented programming. Objects of the program interact by sending messages to each other.\n\nWhat Is an Object? (in the Learning the Java Language trail)\n\n    An object is a software bundle of related variables and methods. Software objects are often used to model real-world objects you find in everyday life. \n\nWhat Is a Message? (in the Learning the Java Language trail)\n\n    Software objects interact and communicate with each other using messages. \n\nWhat Is a Class? (in the Learning the Java Language trail)\n\n    A class is a blueprint or prototype that defines the variables and the methods common to all objects of a certain kind. \n\nWhat Is Inheritance? (in the Learning the Java Language trail)\n\n    A class inherits state and behavior from its superclass. Inheritance provides a powerful and natural mechanism for organizing and structuring software programs. \n\nWhat Is an Interface? (in the Learning the Java Language trail)\n\n    An interface is a contract in the form of a collection of method and constant declarations. When a class implements an interface, it promises to implement all of the methods declared in that interface. \n\nHow Do These Concepts Translate into Code? (in the Learning the Java Language trail)\n\n    This section looks at a small applet, and shows you the code that creates objects, implements classes, sends messages, establishes a superclass, and implements an interface.\n\nfor the importance part\n\nObject-oriented programming is claimed to give more flexibility, easing changes to programs, and is widely popular in large-scale software engineering. Furthermore, proponents of OOP claim that OOP is easier to learn for those new to computer programming than previous approaches, and that the OOP approach is often simpler to develop and to maintain, lending itself to more direct analysis, coding, and understanding of complex situations and procedures than other programming methods. Translation from real-world phenomena/objects (and conversely) is eased because there is direct mapping from the real-world to the object-oriented program (generally a many-to-one). The converse mapping, from the object-oriented program back to the real-world, is by way of a one-to-many mapping, where each 'many' is seen to be a collection of well-defined subsets (or superset), which together compose a real-world object. The corresponding object defined in the program may be seen as representing some proper subset of the real-world object's features.
55122
Better way is to creat an instance of Random class.\nIt has methods, nextInteger(), nextdouble(), and others.
376552
Stack. Because of its LIFO (Last In First Out) property it remembers its `caller' so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.
758488
In computer science, runtime or run time describes the operation of a computer program, the duration of its execution, from beginning to termination (compare compile time). The term is also used as a short form when referring to a runtime library (without a space), a program or library of basic code that is used by a particular computer language to manage a program written in that language while it is running.\n\nA runtime environment is a virtual machine state which provides software services for processes or programs while a computer is running. It may pertain to the operating system itself, or the software that runs beneath it.\n\nIn most cases, the operating system handles loading the program with a piece of code called loader, doing basic memory setup and linking the program with any dynamically linked libraries it references. In some cases a language or implementation will have these tasks done by the language runtime instead, though this is unusual in mainstream languages on common consumer operating systems.\n\nSome program debugging can only be performed (or are more efficient or accurate) when performed at runtime. Logical errors and array bounds checking are examples. For this reason, some programming bugs are not discovered until the program is tested in a "live" environment with real data, despite sophisticated compile-time checking and pre-release testing. In this case, the end user may encounter a runtime error message.\n\nA runtime library is a collection of utility functions which support a program while it is running, working with the operating system to provide facilities such as mathematical functions, input and output. These make it unnecessary for programmers to continually rewrite basic capabilities specified in a programming language or provided by an operating system.\n\nEarly runtime libraries such as that of Fortran provided such features as mathematical operations. Other languages add more sophisticated memory garbage collection, often in association with support for objects.\n\nMore recent languages tend to have considerably larger runtimes with considerably more functionality. Many object oriented languages also include a system known as the "dispatcher" and "classloader". The Java Virtual Machine (JVM) is an example of such a runtime: It also interprets or compiles the portable binary Java programs (bytecode) at runtime. The .NET framework is another example of a runtime library.\n\nException handling is one language feature designed to handle runtime errors, providing a structured way to catch completely unexpected situations as well as predictable errors or unusual results without the amount of inline error checking required of languages without it.\n\nExample: A program written in Java, would receive services from the Java Runtime Environment by issuing commands from which the expected result is returned by the Java software. By providing these services, the Java software is considered the runtime environment of the program. Both the program and the Java software combined request services from the operating system. The operating system kernel provides services for itself and all processes and software running under its control. The Operating System may be considered as providing a runtime environment for itself.\n\nHere's the link : \nhttp://en.wikipedia.org/wiki/Run-time_error\n\nFeel free to contact me :)
696666
Store the last operation as a module level variable or a static variable within the procedure.\n\nBetter yet - build a property for the form called last operation and then every time you hit divide/add/subtract/multiply just store that operation. Then on the equals check for the property you created.\n\nHere is the property syntax :\n\nPrivate msLastOp as String * 1\n\nPublic Property Get LastOp() As String\n    LastOp = msLastOp\nEnd Property\n\nPublic Property Let LastOp(ByVal sNewValue As String)\n    msLastOp = sNewValue\nEnd Property\n\nI dunno, something like that. Just another route.
590165
no, there are no pointers in Java, which means no memory addresses.  Whenever you pass a variable to a function, you pass a reference, neither a copy of the variable or the variable's address.
35090
Elflemming is correct.\nWhen you run the class state it is loaded in JVM. Then when you use Example class it is then loaded on JVM. Keep in mind, no instance is created, only class is loaded.\nWhenever you use a class for first time JVM loads it . When loading class it initializes all static variable and executes static initializer.( If exists.)\nSo no instance of exaple class will be created.
925250
BOOKS ???\n\nwrite a overload method for the assignment operator in the derived class.... if the same operator is overloaded in the base class then you must use virtual keyword in the base overloading method.
409150
I think your don't have any JAVA Virtual Machine (JVM) installed.\n\nJust get it here\nhttp://www.java.com/en/download/manual.jsp
74620
Given the architecture of the JVM, you need only be concerned with instance and class variables when you worry about thread safety. Because all threads share the same heap, and the heap is where all instance variables are stored, multiple threads can attempt to use the same object's instance variables concurrently. Likewise, because all threads share the same method area, and the method area is where all class variables are stored, multiple threads can attempt to use the same class variables concurrently. When you do choose to make a class thread-safe, your goal is to guarantee the integrity -- in a multithreaded environment -- of instance and class variables declared in that class. \n\nYou needn't worry about multithreaded access to local variables, method parameters, and return values, because these variables reside on the Java stack. In the JVM, each thread is awarded its own Java stack. No thread can see or use any local variables, return values, or parameters belonging to another thread.
595895
As blueJ is Java development environment, I think you are talking about java.\n\nIn java if you put a value already in map, old vlue is replaced by new one.
430224
It means that the function was declared in another file. If you dont use "extern", and it is defined in another file you will get an error something like "error, multiple declarations of..."
271024
Start designing the whole system. Inheritance is just a technique for reuse and sometimes there are better aproach to achive it. \n\nWhen the common characteristics of a class are known (the less required information/behaviour that your framework code needs to proceed), create the base class and then define the virtual points that can be overriden :) Test your design with your subclasses - when you define them, the modification should be easy to maintain.