Thursday, 16 April 2015

MS.Net and Java are the core technologies. Nowadays there are numerous technologies emerging in the market. some of them like ABAP,Informatica,SAP some are tools and most are technologies.
at whatever cost,they should be expertise in their specific domains.
Also upgrading to latest technologies, makes a plus to the career.

Thursday, 8 January 2015

Software engineers shall commit themselves to making the analysis, specification, design, development, testing and maintenance of software a beneficial and respected profession. In accordance with their commitment to the health, safety and welfare of the public, software engineers shall adhere to the following Eight Principles:
1. PUBLIC - Software engineers shall act consistently with the public interest.
2. CLIENT AND EMPLOYER - Software engineers shall act in a manner that is in the best interests of their client and employer consistent with the public interest.
3. PRODUCT - Software engineers shall ensure that their products and related modifications meet the highest professional standards possible.
4. JUDGEMENT - Software engineers shall maintain integrity and independence in their professional judgement.
5. MANAGEMENT - Software engineering managers and leaders shall subscribe to and promote an ethical approach to the management of software development and maintenance.
6. PROFESSION - Software engineers shall advance the integrity and reputation of the profession consistent with the public interest.
7. COLLEAGUES - Software engineers shall be fair to and supportive of their colleagues.
8. SELF - Software engineers shall participate in lifelong learning regarding the practice of their profession and shall promote an ethical approach to the practice of the profession.
--------------------------------------------------------------------------------------------------------------------------

Wednesday, 7 January 2015

public class akarsh12 {

public static void main(String[] args) {
A a=new B();
a.display();

}

}
class A
{
void display()
{
System.out.println("I am person");
}
}
class B extends A
{
void display()
{
System.out.println("I am student");
}
}

Ans: I am student
public class akarsh11 {
int a;
double b;
char c;
float d;
boolean e;
public static void main(String[] args) {
System.out.println(a);
System.out.println(b);
System.out.println(c);
System.out.println(d);
System.out.println(e);

}

}

output:Cannot make a static reference to the non-static field

Monday, 5 January 2015

                                                            Marker Interfaces in Java


"An interface is called a marker interface when it is provided as a handle by Java interpreter to mark a class so that it can provide special behaviour to it at 
runtime and they do not have any method declarations". 

In the above definition "and they do not have any method declarations" is added because, till now all the marker interfaces provided by Java do not have method 
declarations. 

We cannot create marker interfaces, as you cannot instruct JVM to add special behaviour to all classes implementing (directly) that special interface. 



We don't need to create your own marker marker interface since it is not recommended by java. For your knowledge I want to make you clear that their 
is no any definition for marker interface in Java specification/api. Whatever we study on web/books is cooked by web developers. 

Now since jdk 1.5 we dont need to use marker interface, in place of this we can use annotations which have their own many advantages. 
Finalization  in Java:
finalize()-
in a typical c++ class,any memory that is dynamically allocated for the data members of the class, have to be explicitly released by the programmer. to enable this, c++ as a language provides te syntax of 'destructor' which will be automatically called when ever the object is about to destroyed. In the destructor the programmer has to access all its data members and hence can release any explicitly allocated memory.

In Java , the concept of destructor was never provided as the destruction of an object,is not in the control of programmer and is completely managed by the garbage collector. Java hence provides the concept of 'finalize method' defined in the base class object that can be overridden by any of the derived classes. The finalize method of an object will be automatically called whenever the garbage collector is about to destroy the current object. How Ever it is recommended by oracle not to relay on the garbage collector, since the call of it is not guaranteed. Instead, the programmer must provide his own mechanism of releasing resources. this process of releasing the resources is done by 'finalize()' method.

Note: '()'-denotes method.