[SPARK-30901][DOCS] Fix doc exemple with deprecated codes
[SPARK-30901][DOCS] Fix doc exemple with deprecated codes

### What changes were proposed in this pull request?

Previous exemple given for spark-streaming-kinesis was true for Apache Spark < 2.3.0. After that the method used in exemple became deprecated:
deprecated("use initialPosition(initialPosition: KinesisInitialPosition)", "2.3.0")
def initialPositionInStream(initialPosition: InitialPositionInStream)

This PR updates the doc on rewriting exemple in Scala/Java (remain unchanged in Python) to adapt Apache Spark 2.4.0 + releases.

### Why are the changes needed?

It introduces some confusion for developers to test their spark-streaming-kinesis exemple.

### Does this PR introduce any user-facing change?

No

### How was this patch tested?

In my opinion, the change is only about the documentation level, so I did not add any special test.

Closes #27652 from supaggregator/SPARK-30901.

Authored-by: XU Duo <8ec57fb4729bdeac5563e93e2041f8fdc67ca410@canal-plus.com>
Signed-off-by: Sean Owen <d519fa33a62684a61ab04b24d26f83452d51b34c@gmail.com>

dongjoon-hyun/spark,shuangshuangwang/spark,holdenk/spark,goldmedal/spark,goldmedal/spark,vinodkc/spark,zero323/spark,gengliangwang/spark,vinodkc/spark,wzhfy/spark,WeichenXu123/spark,jiangxb1987/spark,JoshRosen/spark,taroplus/spark,kevinyu98/spark,ueshin/apache-spark,maropu/spark,xuanyuanking/spark,gengliangwang/spark,milliman/spark,WeichenXu123/spark,wangyum/spark,apache/spark,JoshRosen/spark,shaneknapp/spark,wangmiao1981/spark,wzhfy/spark,shaneknapp/spark,witgo/spark,dbtsai/spark,BryanCutler/spark,ConeyLiu/spark,taroplus/spark,cloud-fan/spark,witgo/spark,witgo/spark,ConeyLiu/spark,ConeyLiu/spark,gengliangwang/spark,skonto/spark,nchammas/spark,spark-test/spark,holdenk/spark,mahak/spark,rednaxelafx/apache-spark,wangyum/spark,nchammas/spark,JoshRosen/spark,kevinyu98/spark,ueshin/apache-spark,zzcclp/spark,dongjoon-hyun/spark,chuckchen/spark,milliman/spark,wzhfy/spark,srowen/spark,HyukjinKwon/spark,JoshRosen/spark,spark-test/spark,zzcclp/spark,chuckchen/spark,zzcclp/spark,wangyum/spark,maropu/spark,shaneknapp/spark,rednaxelafx/apache-spark,goldmedal/spark,vinodkc/spark,wangmiao1981/spark,jiangxb1987/spark,holdenk/spark,apache/spark,jiangxb1987/spark,goldmedal/spark,holdenk/spark,srowen/spark,taroplus/spark,hvanhovell/spark,hvanhovell/spark,milliman/spark,xuanyuanking/spark,matthewfranglen/spark,hvanhovell/spark,wangmiao1981/spark,kevinyu98/spark,JoshRosen/spark,cloud-fan/spark,shuangshuangwang/spark,JoshRosen/spark,hvanhovell/spark,vinodkc/spark,zuotingbing/spark,apache/spark,zero323/spark,BryanCutler/spark,ueshin/apache-spark,witgo/spark,BryanCutler/spark,mahak/spark,ueshin/apache-spark,nchammas/spark,ConeyLiu/spark,HyukjinKwon/spark,ConeyLiu/spark,HyukjinKwon/spark,dbtsai/spark,kevinyu98/spark,vinodkc/spark,zuotingbing/spark,wangyum/spark,mahak/spark,dbtsai/spark,nchammas/spark,ptkool/spark,chuckchen/spark,milliman/spark,srowen/spark,ConeyLiu/spark,ConeyLiu/spark,goldmedal/spark,taroplus/spark,shuangshuangwang/spark,cloud-fan/spark,spark-test/spark,ueshin/apache-spark,taroplus/spark,wzhfy/spark,vinodkc/spark,dongjoon-hyun/spark,zuotingbing/spark,zzcclp/spark,kevinyu98/spark,witgo/spark,dongjoon-hyun/spark,skonto/spark,goldmedal/spark,maropu/spark,zzcclp/spark,JoshRosen/spark,holdenk/spark,cloud-fan/spark,BryanCutler/spark,spark-test/spark,taroplus/spark,gengliangwang/spark,wangmiao1981/spark,wangyum/spark,zuotingbing/spark,xuanyuanking/spark,nchammas/spark,wangyum/spark,zero323/spark,vinodkc/spark,spark-test/spark,BryanCutler/spark,ptkool/spark,ptkool/spark,WeichenXu123/spark,HyukjinKwon/spark,nchammas/spark,shuangshuangwang/spark,gengliangwang/spark,cloud-fan/spark,witgo/spark,HyukjinKwon/spark,dbtsai/spark,skonto/spark,maropu/spark,rednaxelafx/apache-spark,maropu/spark,jiangxb1987/spark,chuckchen/spark,dbtsai/spark,rednaxelafx/apache-spark,wangmiao1981/spark,milliman/spark,HyukjinKwon/spark,WeichenXu123/spark,ptkool/spark,dongjoon-hyun/spark,rednaxelafx/apache-spark,skonto/spark,gengliangwang/spark,hvanhovell/spark,ueshin/apache-spark,taroplus/spark,BryanCutler/spark,maropu/spark,WeichenXu123/spark,rednaxelafx/apache-spark,cloud-fan/spark,hvanhovell/spark,BryanCutler/spark,zuotingbing/spark,apache/spark,zero323/spark,xuanyuanking/spark,mahak/spark,wzhfy/spark,dbtsai/spark,HyukjinKwon/spark,cloud-fan/spark,shaneknapp/spark,shuangshuangwang/spark,shuangshuangwang/spark,shaneknapp/spark,mahak/spark,holdenk/spark,WeichenXu123/spark,chuckchen/spark,wzhfy/spark,spark-test/spark,mahak/spark,holdenk/spark,spark-test/spark,zero323/spark,skonto/spark,shaneknapp/spark,kevinyu98/spark,srowen/spark,apache/spark,dongjoon-hyun/spark,dbtsai/spark,ptkool/spark,jiangxb1987/spark,apache/spark,chuckchen/spark,xuanyuanking/spark,skonto/spark,nchammas/spark,rednaxelafx/apache-spark,gengliangwang/spark,ptkool/spark,chuckchen/spark,zuotingbing/spark,srowen/spark,shaneknapp/spark,milliman/spark,mahak/spark,wangyum/spark,wangmiao1981/spark,milliman/spark,ptkool/spark,shuangshuangwang/spark,wzhfy/spark,srowen/spark,skonto/spark,xuanyuanking/spark,wangmiao1981/spark,goldmedal/spark,jiangxb1987/spark,zzcclp/spark,WeichenXu123/spark,ueshin/apache-spark,xuanyuanking/spark,hvanhovell/spark,dongjoon-hyun/spark,jiangxb1987/spark,maropu/spark,srowen/spark,witgo/spark,apache/spark,zero323/spark,zero323/spark,zzcclp/spark,kevinyu98/spark,zuotingbing/spark