|
javaworld.com
Upvotes received | 0 |
Downvotes received | 0 |
Karma: | 0 (upvotes-downvotes) |
|
0 earned Badges No badges were found
Definitions (21)
1 |
0
0
listing 1. evaluating mathematical expressions with repl
$ bash ./scripts/run.sh | Welcome to JShell -- Version 0.710 | Type /help for help -> Math.sqrt( 144.0f ); | Expression value is: 12.0 | assigned to temporary variable $1 of type double -> $1 + 100; | Expression value is: 112.0 | assigned to temporary variable $2 of type double -> /vars | double $1 = 12.0 | double $2 = 112.0 -> double v [..]
Meaning awaits approval from a moderator |
2 |
0
0
listing 2. calculate the fibonacci sequence
$ bash ./scripts/run.sh | Welcome to JShell -- Version 0.710 | Type /help for help -> long fibonacci(long number) { >> if ((number == 0) || (number == 1)) >> return number; >> else >> return fibonacci(number - 1) + fibonacci(number - 2); >> } | Added method fibonacci(long) -> /methods | fibonacci (long)long -> [..]
Meaning awaits approval from a moderator |
3 |
0
0
listing 3. repl for re-use
> long fibonacci(long number) { >> return 1; >> } | Modified method fibonacci(long) -> for( long i : array ) { System.out.println(fibonacci( i )); } 1 1 1 1 1 1 1
Meaning awaits approval from a moderator |
4 |
0
0
listing 4. dynamic class definition
MacOSX:repl tobrien$ bash ./scripts/run.sh | Welcome to JShell -- Version 0.710 | Type /help for help -> class Person { >> public String name; >> public int age; >> public String description; >> >> public Person( String name, int age, String description ) { >> this.name = name; >> this.age = age; >> [..]
Meaning awaits approval from a moderator |
5 |
0
0
listing 5. know your /history
> /history class Person { public String name; public int age; public String description; public Person( String name, int age, String description ) { this.name = name; this.age = age; this.description = description; } public String toString() { return this.name; } } Person p1 = new Person( "Tom", 4, "Likes Spiderman" ); Person [..]
Meaning awaits approval from a moderator |
6 |
0
0
listing 6. modifying person
> /l 1 : class Person { public String name; public int age; public String description; public Person( String name, int age, String description ) { this.name = name; this.age = age; this.description = description; } public String toString() { return this.name; } } 2 : Person p1 = new Person( "Tom", 4, "Likes Spiderman" ); 3 : [..]
Meaning awaits approval from a moderator |
7 |
0
0
dom
DOM (Document Object Model) is the standard in-memory XML representation. DOM proves flexible in that you can access any document bits whenever you want, but it can be memory hungry, so developers commonly use it to build client applications where memory is not an issue. DOM suffers from being old, language-neutral (so it is a lowest common denomin [..]
Meaning awaits approval from a moderator |
8 |
0
0
sax
SAX (Simple API for XML) differs from DOM in that it is event-driven: the document flashes before your eyes while the parser notifies you of elements and attributes. You pick out the bits you want as it goes by. SAX is lightweight and simple, but working out your location in a document can be challenging. Developers generally use SAX in server appl [..]
Meaning awaits approval from a moderator |
9 |
0
0
jaxp
JAXP (Java API for XML Parsing) is not really a technology separate from DOM or SAX, but simply an extension to both that makes them easier to use in Java. Both DOM and SAX are language-neutral, so neither answers questions like, "How do we create a parser." JAXP answers the creation question and is a standard API for XSLT (Extensible Sty [..]
Meaning awaits approval from a moderator |
10 |
0
0
jdom
To those struggling with DOM, JDOM will seem like a breath of fresh air. JDOM fixes some of DOM's more arcane areas. For example, unlike with DOM, in JDOM elements and attributes are objects, so you can call new Element("name");
Meaning awaits approval from a moderator |
To view all 21 definitions, please sign in.