Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Meaning of class file on the file system (Sybex)

Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm studying on lambda expressions, the book illustrates an example that uses `toString()` method of lambda expressions.

It explains meaning of the output as,  

This actually does mean something. Our test class is named BuiltIns ,
and it is in a package that we created named functionalinterface .
Then comes `$$` , which means that the class doesn’t exist in a class
file on the file system. It exists only in memory.

I don't understand the meaning of the last sentences. Could you express it?
author & internet detective
Posts: 39396
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jack,
When you quote from a book, can you say which book it is. I recognize this sentence as one I wrote so added it for you.

As far as the text, when you create a class, you type out a .java file and compile it to a .class file. Both are actual files that exist somewhere on your filesystem. The $$ shows it is different. There is no .java class on the filesystem. Instead Java creates the class for us. That way you don't have to type out a class and can just supply the lambda expression.

Any clearer?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!