Wednesday, November 26, 2014

Some information about java

What was the original name of Java?
  • Oak
What is the name of the Java mascot?
  • Duke
What is not true about JavaBeans?
  • They're fully compiled to native code.
Which is not an official edition?
  • BE
Which is never true for all possible values of x?
  • (x===x)
JavaFX is:
  • A language for building browser-based content
OpenJDK is not:
  • An open source tool for running Java in your browser or through Web Start
What does the letter "E" do when you create an interface with a generic specification like this:        public void interface List(){ }
  • "E" is a placeholder for the type.
10 Swing is to AWT as:
  • nio is to io
11 Which is not part of the Java EE 6 platform?
  • JavaFX
12 The Serialization API was created as:
  • A technique for converting objects to a well-defined sequence of bytes
13 Java Web Start is:
  • A set of tools for starting up JAR files directly from Web pages
14 Java Hot Spot is:
  • A just-in-time compiler that lets the JVM optimize byte code
15 Which platform doesn't run Java out of the box?
  • PC
16 What is the difference between an int and an Integer?
  • One is a primitive represented with four bytes, and the other is an object.
17 The Collection interface is used:
  • To have a standard interface for different ways to store collections of objects
18 Which is not true of a Java exception?
  • Exceptions can only jump over three blocks in order to make code easier to debug.
19 The Java sandbox:
  • Controls which classes run with the ClassLoader object




Tuesday, November 25, 2014

StringBuffer example


 public class BufferDemo  
 {  
      public static void main(String args[])  
      {  
           String foo="foo";  
           String a="abc"+foo+"def"+Integer.toString(47);  
           System.out.println(a);  
           StringBuffer ab= new StringBuffer("abc");  
           ab.append(foo);  
           ab.append("def");   
           ab.append(Integer.toString(47));  
           System.out.println(ab);  
      }  
 }  

Breaking loop in java

In example, Test class has a main method and a for loop inside it and printing the looped value on console and break syntax will hault the execution of loop.
 public class test2  
 {  
      public static void main(String args[])  
      {  
           for(int x=5;x<=10;x++)  
           {  
                if(x%10==0)  
                {  
                     System.out.println(x);  
                     break;  
                     System.out.println(x);  
                }  
           }  
      }  
 }  

String Manipulation in java

In example, Test class has a main method and local string variable with few string manipulation i.e length of string, character at given position and string comparison.
 public class Test1  
 {  
      public static void main(String args[])  
      {  
           String result1="hello java";  
           int result2=result1.length()%3;  
           char result3=result1.charAt(3);  
           String result4="result1"+"result1";  
           System.out.println(result1.equals("hello java"));  
           System.out.println(result2);  
           System.out.println(result3);  
           System.out.println(result4);  
           System.out.println(result1.lastIndexOf('w'));  
      }  
 }  

For loop example in java

In example, Test class has a main method and local variable with a for loop inside it and printing the looped value on console.
 public class Test   
 {  
      public static void main(String args [])  
      {  
           int total=0;  
           int a=0;  
           int num=4321;  
           for(int x=0;x<4;x++)  
           {  
                a=num/10;  
                num=num/10;  
                System.out.println(a);  
                total +=a;  
           }  
                System.out.println(total);  
      }  
 }  

Thursday, March 13, 2014

Hibernate Tutorial


Video Tutorial from Java Brains

Maximize the efficiency of your Scrum process with OnTime

Kanban

)

Easily manage product backlogs


Add new user stories, defects and incidents. Organize items into projects, releases and sprints, then assign them to team members.

Effectively plan releases and sprints


Easily plan new sprints and releases by dragging in user stories until your release capacity meter is filled.

Quickly analyze burndown velocity


Gather work data from your team, and use it to evaluate your releases and monitor progress with Scrum burndown charts.

Wednesday, March 12, 2014

Proxy Objects

A proxy object acts as an intermediary between the client and an accessible object. The purpose of the proxy object is to monitor the life span of the accessible object and to forward calls to the accessible object only if it is not destroyed.
Proxy Design Pattern Example
Fig - Proxy Design Pattern Example
Follow the links below for Java Reflection - Dynamic Proxies tutorials



Friday, March 7, 2014

svn 1.8.0 "problem both sides of the move must be committed together"


  Illegal target for the requested operation  
 svn: Commit failed (details follow):  
 svn: Cannot commit 'E:\JOB\Hotel Project\SVNMandal10Feb2014\branches\mandala_soft\src\main\webapp\jsp\room\setup_room_state_form.jsp' because it was moved from 'E:\JOB\Hotel Project\SVNMandal10Feb2014\branches\mandala_soft\src\main\webapp\jsp\setup_room_state_form.jsp' which is not part of the commit; both sides of the move must be committed together  

Tips:
Commit parent folder inside which you moved files by drag and drop. This solve the problem in SVN by performing commit  at both  sides of the move the same time, thus solution to the problem.


To solve this problem follow the instruction in the image:

Step 1:
Fig1 :- SVN 1.8 file committed together step 1

Step 2:
Illegal target for the requested operation