Skip to main content

Posts

Showing posts from July, 2015

Employee Details in java

CONCEPT: - We want to save data securely,       Requirements:                           1.local variable defined as a public                           2.Setter it is used to controller shift to the variables                           3. Getter it is used to return the value to a constructor                           4. we got the getter value,we did not understand,we need to  value converted,so we                                    use toString                             5.whether Entered data is correct or not as per stored data at the time we write logic                               public  public boolean equals(Object obj)                            6.we want access object  Employee e2=(Employee)obj;   see example easily Understand : public class Employee { private int id; private String firstname; private String lastname; private String fathername; public Employee(int id,String firstname,String lastname,String fathername) { this.id=id; this.firstname=firstname; this.la

Multiple Threads Accessing one method in Java

Concept:                we want access multiple thread using one method    Main Method:  Several threads are coming different location than handle it using method                           variable names are represented as global it as unique variable as all thread   step:-1 synchronized method used to handle multiple thread and execute one by one thread                         with in the main main method variable names are represented because of step by step execution of threads at the time same variable name represented as different thread step:-2  multiple threads are coming we want execute step by step by using notify and wait              notify  means it will be report coming  to execution of threads               wait(2000);  means that one thread is able to access resource sharing remaining threads won't be access it will wait 2000msec                         //main method:  public class Addition { public synchronized void add (int a,int b,boolean status

Concept of Threads in Java

Before we learn Threads, We know the Process,thread is part of Process Process:- When ever we are operating multiple application is called Process. Thread:- For an example we are printing the document by using word,notepad etc... While doing this process of printing copy and paste of document, at the time copy paste content also printing,this process is also called as THREADS. Today's world applications standards will be more,if you use Threads in Java application standards will be increased.. Ex :- public class HelloThread extends Thread  //Thread present in java.lang package so we extends the                                                                             thread { public void HelloThread()   //Method name same as main method because of run  the                                                                               program                                                           { start();    //it is initiated Thread } public

How to screenshot Windows phone

Press and hold the volume up,volume down buttons and power button