Deploy = build packet application that use by user to install your program
Deploy = Finishing & Packaging
In Java :
- desktop : usually we deploy application to *.jar files
- web app : usually we deploy it to *.war files
feel free to visit http://www.javaclopedia.com
What is the least possible number of iterations for a for loop?
The least possible is no iterations:
for (x=0; x<max; ++x) {
// ...
}
In the above example, if max is less than or equal to zero then the body of the loop will not execute.
Explain three different methods in java?
How do you overload constructors in java?
Overloading a constructor means typing in multiple versions of the constructor, each having a different argument list, like the following examples:
class Car {
Car() { }
Car(String s) { }
}
The preceding Car class has two overloaded constructors, one that takes a string, and one with no arguments. Because there's no code in the no-arg version, it's actually identical to the default constructor the compiler supplies, but remember-since there's already a constructor in this class (the one that takes a string), the compiler won't supply a default constructor. If you want a no-arg constructor to overload the with-args version you already have, you're going to have to type it yourself, just as in the Car example.
Overloading a constructor is typically used to provide alternate ways for clients to instantiate objects of your class. For example, if a client knows the Car name, they can pass that to a Car constructor that takes a string. But if they don't know the name, the client can call the no-arg constructor and that constructor can supply a default name
What is the meaning of and in C programming language and when is it used?
logical and: exp1 && exp2 means:
exp1==0 ? 0 : exp2==0 ? 0 : 1
Can you define multiple parameters for one method in java?
The formal Java Language Specification does not list a hard limit on the number of formal parameters allowed. Generally, if you're worried that you might "run out" of parameter spaces, you will probably want to redesign your method.
You must have the Java Run-time Environment installed on your computer.
Steps:
1. Open Command Prompt
2. Enter the command: javac class.java
3. Enter the command: java <classfilename> (without the .java or .class extension)
The javac command will compile your java source file and create a class file. The java command will execute or run your java class file.
Why use static variable in programming language?
For C programming, the use of a static variable has two uses:
One reason is to hide the variable from other modules. The scope of the static variable is limited to the compilation unit that it is described in.
The second use of a static variable is to keep the value of the variable intact through the entire program execution unit.
What are the problems of the bottom-up budgeting approach?
The problem related with this technique are as follow: To many people emplyeed in the decision making process causing long term planning before an agreement is reached. Sometimes the influencer maker in the belonging group might furhter emphasize his opinion towars a strategic which it is not very wise. The problem related with this technique are as follow: To many people emplyeed in the decision making process causing long term planning before an agreement is reached. Sometimes the influencer maker in the belonging group might furhter emphasize his opinion towars a strategic which it is not very wise.
Specification forms of inheritance in java?
single level inheritance eg ( class B extends Class A)
Multilevel inheritance eg( class C extends class B and class B extends class A)
multiple inheritance Class C inherits Class A features as well as Class B featues.This type of inheritance is not allowed in JAVA.
What are the rules of creating identifier?
Identifiers refers to the names of variables, functions and array. These are user defined names and consist of a sequence of letters and digits, with a letters as a first character.Both uppercase and lowercase letters are permitted, although lowercase letters are commonly used. The underscore character is also permitted in identifiers. It is usually used as a link between two words in long identifiers.
In C, identifiers may contain any alphanumeric characters (a-z, A-Z, 0-9) as well as underscores (_), but must not begin with a number.
Can I have some example java programs?
import java.io.*;//package defined
//class name example
public class example{
//function name declare
public static void main(String str)
{
system.out.println("welcome to java world");
}
}
to run this program :-
1.setting the environmental variables
(including path c:/jdk1.3/bin/ in existing path)
not as like that what ever the path of bin you mention,specify correctly
2.in the command prompt
type javac
it display some thing
with out any error
3.
in the command prompt
>/javac example.java
4.
>/java example
What is the difference between software and interface?
software is a collection of programs
inteface is a accessing a application
How do you achieve encapsulation by using class?
By making fields private. That way, they can't be directly accessed from the outside - the are hidden, that is, encapsulated.
How do you invoke static methods?
if some method is static, then you can not call that method through the oobject of that class. but the name of the class.
let us see a example:
class Test
{
int a;
int b;
static void show()
{
System.out.println("we are in show");
}
}
class Main
{
public static void main(String args[])
{
Test t=new Test();
t.show();\\thiss is an erroraneous code. because, the method "show()" is static.
Test.show();\\this is correct
}
Arnas Sinha
What time of loop is used when you know how many times the loop instructions should be processed?
It's best to use a for loop.
For example, if you want 10 iterations:
for (int i = 1; i <= 10; i++)
{
// Any commands you write here will repeat 10 times.
}
What is the best site to download java games?
One can find a free collection of Java games from Mob or Java's website. There are some other websites that host Java games, such as Funny-Games and Chess Games.
Is array made up of number of data items?
Yes, that's the idea of an array.
Yes, that's the idea of an array.
Yes, that's the idea of an array.
Yes, that's the idea of an array.
When do you declare a method final in java?
You declare a method final in Java when you do not want any subclasses of your class to be able to override the method.
I have also heard that this allows the Java compiler to make more intelligent decisions. For example, it supposedly allows Java to decide when to make a method inline. (Note that this is all unconfirmed)
What are the rules for the expression evaluation in Java?
* arithmetic expressions are evaluated from left to right using the rules of precedence..
* when parentheses are used,the expressions within parentheses assume highest priority...
* if parentheses are nested, the evaluation begins with the inner most parentheses...
* the associativity rules are applied when 2 or more operators of same precedence level appear in a sub expression
What are Instance variables java?
Instance variable
A variable, part of an Object. These might better be called perObject variables since each instantiated object of this class will have its own private copy of this variable. They are allocated when the object is allocated via new. Static methods may not access the instance variables of their class (or any other class for that matter), other that via some object reference, e.g. anObject.someField. Static methods may even access private instance variables in their class via some object reference.
How can you allocate memory dynamically in Java?
To give java more memory there are a series of steps to follow. To start, go to the computer's control panel, select programs, then go to java settings. This should initiate the Java control panel to pop up. Click on the Java tab followed by the view button. Click on the "runtime parameters" and input the specifics desired. Once finished hit okay then apply and it should increase the memory on your Java.
Java program to illustrate Wrapper class?
java uses simple or primitive data types, such as int, char and Boolean etc. These data types are not part of the object hierarchy. They are passed by value to methods and cannot be directly passed by reference. However, at times there is a need to create an object representation of these simple data types. To address this need, Java provides classes that correspond to each of these simple types. These classes encapsulate, or wrap, the simple data type within a class. Thus, they are commonly referred to as wrapper classes.
Wrapper classes corresponding to respective simple data types are as given in table below.
Primitive Data Types
Wrapper class
byte
Byte
short
Short
int
Integer
long
Long
char
Character
float
Float
double
Double
boolean
Boolean
void
Void
eg
Say supposing there is a requirement to store only the
object in an array A.The Primitive types cannot be stored in
the same array as the array can accommodate only Objects
here is where Wrapper Class come into picture.ie, we create
wrapper for the primitive types.One such example is as below
Ex:int i;
Wrapper class for the primitive type(int) is created as below:
Integer i = new Integer();
What is the type of class for which object cannot be created?
A class that is declared as "final" cannot be inherited.