grylix
Programming Clojure, Fourth Edition: Different Java class (page 81)
On page 80 (at the bottom) you execute the command
(first (System/getProperties))
and on top of page 81 you show the output as
` → #object[java.util.Hashtable$Entry 0x12468a38
“java.runtime.name=Java™ SE Runtime Environment”]
However, If I execute this command, I receive
>java --version
openjdk 21.0.2 2024-01-16
OpenJDK Runtime Environment (build 21.0.2+13-58)
OpenJDK 64-Bit Server VM (build 21.0.2+13-58, mixed mode, sharing)>clj --version
Clojure CLI version (deps.clj) 1.12.4.1582>clj
Clojure 1.12.4
user=> (first (System/getProperties))
#object[java.util.concurrent.ConcurrentHashMap$MapEntry 0x1e7f2e0f “java.specification.version=21”]
i.e. the type is a ConcurrentHashMap-Entry, although Properties is still an extension of the very old class Hashtable. Seems to be a Clojure effect.
I propose to just change the printed output.
Popular Pragmatic Bookshelf topics
Other popular topics
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /emacs
- /haskell
- /svelte
- /onivim
- /typescript
- /kotlin
- /c-plus-plus
- /crystal
- /tailwind
- /react
- /gleam
- /ocaml
- /flutter
- /elm
- /vscode
- /ash
- /html
- /opensuse
- /zig
- /centos
- /deepseek
- /php
- /scala
- /react-native
- /lisp
- /sublime-text
- /textmate
- /nixos
- /debian
- /agda
- /django
- /deno
- /kubuntu
- /arch-linux
- /nodejs
- /revery
- /ubuntu
- /spring
- /manjaro
- /lua
- /diversity
- /julia
- /markdown
- /c









