This week's book giveaways are in the Jython/Python and Object-Oriented programming forums.
We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!

Ng Sharma

Ranch Hand
+ Follow
since Feb 23, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ng Sharma

Mikalai Zaikin wrote:

Ng Sharma wrote:if I'm using a ServiceLoader in our program. when mandatory to used 'uses' keyword in module.



When you define service client module you must use "uses" directive, see more details in my guide here:

http://java.boot.by/ocpjd11-upgrade-guide/ch02.html

As well (optionally):

http://java.boot.by/ocpjd11-upgrade-guide/ch02s02.html




First of follow Thanks to provide good stuff.

Cloud you tell me please . how to work ServiceLoader.
if I'm using a ServiceLoader in our program. when mandatory to used 'uses' keyword in module.
please anyone explain me module descriptor file allowed import Why?
what is the used of import statement in module descriptor.

Here's how you compile and run your application:


javac -d out --module-source-path src -m calc
Run Compile command throws

error: module calc not found in module source path
└── src
   └── calculator
       ├── com
       │   └── ngsharma
       │       └── oca
       │           └── Calculator.java
       └── module-info.java


Calculator.java


module-info.java




Compile this above program




.
├── out
│   └── calc-module <--- Directory name changed
│       ├── com
│       │   └── ngsharma
│       │       └── oca
│       │           └── Calculator.class
│       └── module-info.class



Run this above program




Q1. module-info.java file name should be same as Calculator directory name or not

Compiled this module throw error:


Run this module throw error:





this program throw weaker privileges. I Can't understand. Please Suggest me. where is my mistake.


lang1 and lang2 pointing a same reference.
Why s3 is not using a unreference String Object.
Please explain step by step..!

Explain this statement



this code segment return a false, Why return a false.

Stephan van Hulst wrote:Neither of your two cases should work, because you're declaring both the variables tf2 and tf4 twice.



typo mistake sorry.


Case:2 internal Object Type but did not work. why and how..?
please can you solved this problem and explain it.