This week's giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Production-Ready Serverless (Operational Best Practices) and have Yan Cui on-line!
See this thread for details.
Win a copy of Production-Ready Serverless (Operational Best Practices) this week in the Cloud/Virtualization forum!

Rhea Camille

Greenhorn
+ Follow
since Oct 10, 2017
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rhea Camille

Hi Ritchie and Andrea,

Thank you for clearing those things
1 year ago
Hi,

I am reading about IO and I'm confused what does it mean of binary data and byte data? How can I create one?
And also about Byte Streams and Character Streams. Let's say I have a MyFile.txt that is 2KB.

MyFile.txt
Hello world!

For Character Stream, does it mean if I have a file, it would read, string by string OR character by character?
It can read as "Hello" "World" or 'H' 'e' 'l' 'l' and so on...

How about the Byte Stream?

TIA



1 year ago
Hi Jeanne,

Thank you for clearing that up, my memory messed, I also re-read that chapter and yes, it will find the requested locale first, then the language with no country then the last one will be the default locale.

Cheers!

Ooops.. sorry for poor code format, here's the edited one.

Dolphins.properties
    name=The Dolphin
    age=0
Dolphins_en.properties
   name=Dolly
   age=4
Dolphins_fr.properties
  name=Dolly


5: Locale fr = new Locale("fr");
6: Locale.setDefault(new Locale("en", "US"));
7: ResourceBundle b = ResourceBundle.getBundle("Dolphins", fr);
8: b.getString("name");
9: b.getString("age");
A. Dolphins.properties and Dolphins.properties
B. Dolphins.properties and Dolphins_en.properties
C. Dolphins_en.properties and Dolphins_en.properties
D. Dolphins_fr.properties and Dolphins.properties
E. Dolphins_fr.properties and Dolphins_en.properties
F. The code does not compile.
Hi,

 Is the answer in OCP Chapter 5 Q#5 in Jeanne Boyarsky's book should be letter E?

This is the question.

5. Suppose that we have the following property files and code. Which bundles are used on lines 8 and 9 respectively?
Dolphins.properties name=The Dolphin age=0
Dolphins_en.properties name=Dolly
age=4
Dolphins_fr.properties name=Dolly
5: Locale fr = new Locale("fr");
6: Locale.setDefault(new Locale("en", "US"));
7: ResourceBundle b = ResourceBundle.getBundle("Dolphins", fr);
8: b.getString("name");
9: b.getString("age");
A. Dolphins.properties and Dolphins.properties
B. Dolphins.properties and Dolphins_en.properties
C. Dolphins_en.properties and Dolphins_en.properties
D. Dolphins_fr.properties and Dolphins.properties
E. Dolphins_fr.properties and Dolphins_en.properties
F. The code does not compile.

As I understand, it should if it didn't find the java/properties file in the given locale it will next search for the default locale.
TIA
Thank you Andrea for clearing that out

Cheers!
Hi,
 I am reading about threads and I am confused could you please enlighten me with this.

 According to what I read "process" is consist of a multiple threads. Can we call a single threaded as a process? I saw this while reading a book.
"A process is a group of associated threads that execute in the same, shared environment. It follows, then, that a single-threaded process is one that contains exactly one thread, whereas a multi-threaded process is one that contains one or more threads."

Could you please also explain to me the difference of thread vs process, I read about that but it doesn't seem to sync in my brain.

Thank you.