Trending ▼   ResFinder  

icse computer applications definitions

3 pages, 16 questions, 4 questions with responses, 6 total responses,    1    0
sotitrivikrama
  
+Fave Message
 Home > sotitrivikrama >

Formatting page ...

SOME IMPORTANT DEFINITIONS COMPUTER APPLICATIONS Static variable/ method The member defined with static keyword becomes a class member and only one copy of it will be available. All the other members are instance methods and they are created for every object that is created. Instance variable is a variable defined in a class (i.e. a member variable), for which each object of the class has a separate copy, or instance. An instance variable is similar to and contrasts with a class variable. A class variable is defined using the static n modifier . An instance variable is a class member that is defined without using the static modifier. this key word : it refers to the currently selected object. When a member method is invoked compiler implicitly uses it to refer to the data member. User can also implicitly use this keyword as Example: this.width=w this.length=l this refers to only instance methods and not class method keyword this is available in any instance method it resolves name space collision (hint : remember how ATM works) Global variable A variable which can be used equally available to all the functions in the class Coercion Explicit type conversion happening by default. Example:int c; int d; double a= c+d; . operator the dot connects classes and objects to members. It is used when you are connecting an object reference variable to a method. when you are connecting a class name to one of its static fields. An example of this is the dot between "System" and "out" in the statements we use to print stuff to the console window. System is the name of a class included in every Java implementation. It has an object reference variable that points to a PrintStream object for the console. So, "System.out.println( "text") invokes the println() method of the System.out object. Message passing: The process of interaction between objects either by passing values or by requesting information is known as message passing How are objects implemented in software terms? All the objects have characteristic and behaviour in real terms. In software terms they are implemented as follows Character is implemented through member variables or data items and behaviour is implemented through member functions Why main method is important Main method is invoked by the compiler by default with out user intervention. It will be the first method to be executed in the program Object as an instance of a class All the objects created from a class will have same structure and behaviour they only differ in their state. As objects are instantiated from the class, an object is called as an instance of a class. Compilation: The process of converting the source code to machine code by the software called as language processor. The process in which language processor called compiler is used is called compilation. Why do we call java Write once run anywhere ? A java program is platform independent, without making changes to the program it can be run on any os. Why main() method is declared as static? The keyword static simply means that the method does not need to be assigned to an instance of an object. Because the main method is the first method executed, it is not attached to an instance. API an abbreviation of application program interface, is a set of routines, protocols, and tools for building software applications. A good API makes it easier to develop a program by providing all the building blocks. API is a protocol intended to be used as an interface by software components to communicate with each other A package is a namespace that organizes a set of related classes and interfaces. Package starts with the keyword packageExamples of java packages: java.applet java.awt java.awt.color Java class library is the main source. In this java is package name and after . operator names of the classes are written. Syntax to import library classes goes like this package-name.class-name.field-or-method_name ; OR package-name.class-name.*; Abstract classes:To declare a class abstract, use the abstract keyword in front of the class keyword at the beginning of the class declaration. There can be no objects of an abstract class. That is, an abstract class cannot be directly instantiated with the new operator. Also, you cannot declare abstract constructors, or abstract static methods. Any subclass of an abstract class must either implement all of the abstract methods in the superclass, or be itself declared abstract. Any class that contains one or more abstract methods must also be declared abstract. Abstract classes are not fully defined. PLEASE TAKE CARE OF THE FOLLOWING POINTS WHILE ANSWERING Short cut key while using shortcut key make it a practise to use brackets effectively, when the shortcut is removed Example a*=a++ + b/ 5; should be written as a=a*(a++ + b/5); function overloading All the overloaded functions must have same name Return type mentioned in function definition should match the data type in function call. capitalization error: Use capital letter only for the first letter of every word in the built in class name, and second word onwards whenever it is function name capital letters must be clearly written Reserved words/ key words should not be used as function names /variable names/class name Semicolon Must be used to mark the end of every statement Must not be used after function/class declaration or after declaring if/for/while etc....

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


Saurabh Kumar Sharma

(2)

Tanay Nayak

(1)

ResPaper Admins

(1)

Kenny martial

(1)

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

sotitrivikrama chat