More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
Ans. If you create table with VOLATILE option, the life of the table will be only for the current session.
It will be automatically dropped by Teradata manager once session expires.
Help us improve. Please let us know the company, where you were asked this question :
Ans. We have followed this practice in one of the project. The only downside we felt was the need to merge the new snapshot version to master after the release.
The Benefit is that it's easy to just ignore the branch if complete rollback happens and hence master remains in sync with production.
Help us improve. Please let us know the company, where you were asked this question :
Q2626. In what terms Java is better language than c and c++ ?
Ans. Java manages pointers intrinsically and gives no control over pointer arithmetic to coders and hence saves the applications from many possible problems like dangling pointers and memory leaks.
Java is platform independent and hence any application can be run on any hardware with the suitable JVM without building it separately for different hardwares.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Assigning a value of one type to a variable of another type is known as Type Casting.
Example :
int x = 10;
byte y = (byte)x;
In Java, type casting is classified into two types, Widening Casting(Implicit) widening-type-conversion and Narrowing Casting (Explicitly done) narrowing-type-conversion.
Widening or Automatic type converion - Automatic Type casting take place when,the two types are compatible and the target type is larger than the source type
Example :
public class Test {
public static void main(String[] args) {
int i = 100;
long l = i; //no explicit type casting required
float f = l;//no explicit type casting required
System.out.println("Int value " i);
System.out.println("Long value " l);
System.out.println("Float value " f);
}
}
Narrowing or Explicit type conversion - When you are assigning a larger type value to a variable of smaller type, then you need to perform explicit type casting.
Example :
public class Test{
public static void main(String[] args) {
double d = 100.04;
long l = (long)d; //explicit type casting required
int i = (int)l;//explicit type casting required
System.out.println("Double value " d);
System.out.println("Long value " l);
System.out.println("Int value " i);
}
}
Help us improve. Please let us know the company, where you were asked this question :
Q2636. suppose i have interface and i have declare lots of abstract method in interface But in sub class only two methods are use .than how to use oly two methods.
Ans. Singleton class will have only one instance through out your application. Once the instance has been created, you can use it to change the state of that object, whereas for immutable class you cannot change the value that means you cannot change the state of it once assigned.
If you want to change the state/ different values, you can very well create two instance for that immutable class which JVM will allow.
Help us improve. Please let us know the company, where you were asked this question :
Ans. yes, Java is a class-based and object-oriented programming language. It is a platform-independent language i.e. the compiled code can be run on any java supporting platform. It runs on the logic of “Write once, run anywhere”.
Help us improve. Please let us know the company, where you were asked this question :