How to include the text of a file in Java code?

It seems that Java is not what I used to do in C (there's no big surprise) I have a set of rules generated from another application (a series of if then checks) These rules change from time to time, so in C, I will do this:

double variableForRules=1;
bool condition=false;
#include "rules.out";
if(condition) //do something

In essence, rules The if then check in out will use "variableforrules" (and several other variables) to determine whether the condition should be set to true If it is set to true after the rule evaluation, the program will perform some actions

Is there a similar method in Java? Or is it my only choice to use rules Out is actually an entire class that needs to be instantiated, and so on?

thank you!

Solution

Because you are automatically generating rules Out, so you can also automatically generate Java functions I hope adding this feature won't be too painful

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>