• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Meaning of class file on the file system (Sybex)

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic