Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Wednesday, 7 August 2013

How to link Java Classes to UML Class Diagram in JDeveloper

1.       Create an Aplication
2.       Create a Java Project  with type Custom Project
3.       Create UML project with type UML Project
3.1.    To Make UML Class Diagram:
3.1.1.  Create a new “Java Class Diagram”
3.1.2. Drag and drop the UML element into this diagram
3.1.3. Use a suitable relationship between each element
3.2.    To Link the UML to the Classes bi-directionally  and generate the classes from diagram
3.2.1. Select the UML Project
3.2.2. Right Click Select “Project Properties”
3.2.3. Go to “Project Source Paths”
3.2.4. Click Remove button to delete the original “src“ folder
3.2.5. Click add button and go through the source folder of the JAVA Project, and save this path

4.       Now your Application had a link between diagram and Classes 

Tuesday, 14 May 2013

Java labeled Break Statement

The break statement has two forms: labeled and unlabeled.
You can also use an unlabeled break to terminate a forwhile, or do-while loop
Unlabeled:

for(;;){
if(){
break; // ends this loop
}
}


Labeled:


outer:
for(;;){
inner:
for(;;){
if(){
break inner; // ends inner loop
} else {
break outer; // ends outer loop
}
}
}