Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Extracting Value from a String that contains key value pairs
//Extracting Value from a String that contains key value pairs // ____ _ __ ____ ____ // | _ \ | |/ / |___ \ | _ \ // | |_) | | ' / __) | | | | | // | _ < | . \ / __/ | |_| | // |_| \_\ |_|\_\ |_____| |____/ // //By <Broken Committee> import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { String variables = "abcd=32434, xxxx=23423, yyy=234234, zzz=23423"; String[] details = variables.split(","); for (int x=0;x<details.length;x++) { String[] d = details[x].split("="); if(d.length == 2) { String key = d[0]; String val = d[1]; if(key.equals("yyy")) { System.out.println("Value found:"+val); } } } } }
run
|
edit
|
history
|
help
0
JAVA # 20 RASTGELE SAYIDAN EN KÜÇÜĞÜNÜ BULMAK
Strings Ops
add
Validate BST
Sample for https://stackoverflow.com/a/49984959/4216641
arithematic
2darray
191fa07131
Rakibul Haque
Counter.java