Frequently Asked Java Program 29: How To Read Data From Text File

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024
  • Topic : How To Read Data From Text File
    #########################
    Udemy Courses:
    #########################
    Manual Testing+Agile with Jira Tool
    ************************************
    ► shorturl.at/xNXZ4
    Selenium with Java+Cucumber
    ********************************
    ► shorturl.at/aIKMW
    Selenium with Python & PyTest
    ********************************
    ► shorturl.at/ELW09
    Selenium with python using Robot framework
    ****************************************
    ► shorturl.at/bcDPZ
    API Testing(Postman, RestAssured & SoapUI)
    *****************************************
    ► shorturl.at/uAWY7
    Web & API Automation using Cypress with Javascript
    ********************************************
    ► rb.gy/4uum2n
    Playwright with Javascript
    **************************
    ► shorturl.at/gALZ1
    Jmeter-Performance Testing
    ************************
    ► rb.gy/ocj7r2
    SDET Essencials(Full Stack QA)
    *************************
    ► rb.gy/hlnf2v
    Appium-Mobile Automation Testing
    ************************************
    ► rb.gy/wmzv64
    Java Collections
    *****************
    ► bit.ly/3S66ezE
    Python Programming
    *********************
    ► urlis.net/gdsf...
    Cucumber BDD Framework
    ***************************
    ► bit.ly/3F7d69r
    Protractor with Javascript
    ***************************
    ► urlis.net/4udd...
    ####################################
    TH-cam Playlists:
    ####################################
    Manual Testing & Agile
    ***********************
    ► bit.ly/3ujvaYa
    ► bit.ly/3OYzxQj
    SQL
    *************************
    ► bit.ly/3R6XjeG
    ► bit.ly/3nE0a1s
    ► bit.ly/3IeKuuJ
    linux & Shell Scripting
    **********************
    ► bit.ly/3up1Z6a
    ► bit.ly/3nzvGxx
    Java
    **********************
    ► bit.ly/3R9QfOs
    ► bit.ly/3AoRMKM
    ► bit.ly/3IbTTDn
    ► bit.ly/3ybXInv
    ► bit.ly/3yCoHdw
    Selenium With Java+Cucumber
    ********************************
    ► bit.ly/3P2FMm4
    ► bit.ly/3yhiIt4
    ► bit.ly/3uokzet
    ► bit.ly/3a7XIND
    ► bit.ly/3umN2S9
    ► bit.ly/3aar7GW
    ► bit.ly/3y9kD2S
    ► bit.ly/3uhLskn
    Python
    ********************************
    ► bit.ly/3agNgU0
    ► bit.ly/3NJNnoy
    ► bit.ly/2CTQ4mR
    ► bit.ly/3OIYWh1
    Selenium With Python,Pytest&Behave
    ***************************************
    ► bit.ly/3OHHoC9
    ► bit.ly/3IeNLdv
    ► bit.ly/2J4tPeT
    ► bit.ly/3ydSkAq
    Selenium With Python Using Robert Framework
    (Web&API Testing)
    *************************************************
    ► bit.ly/3nUvlpr
    ► bit.ly/3nUvE3z
    API Testing (Postman,SoapUi,&Rest Assured)
    **********************************************
    ► bit.ly/3OXacWY
    ► bit.ly/3yh0UhE
    ► bit.ly/3nC9DWQ
    ► bit.ly/3yGfhNS
    ► bit.ly/3OJa11H
    ► bit.ly/3P2slCC
    Mobile App Testing Appium
    ****************************
    ► bit.ly/3Al49HG
    Performance Testing Jmeter
    *******************************
    ► bit.ly/3nz4fE7
    Maven,Jenkins,Git,Github,CI/CD
    *******************************
    ► bit.ly/3P16HPj
    ► bit.ly/3yhlUVA
    ► bit.ly/3afYfwT
    ► bit.ly/3yGzweG
    ► bit.ly/3yF73Ws
    ► bit.ly/3NCOmH7
    SQL,DB Testing&ETL,Bigdata
    *******************************
    ► bit.ly/3NKOcNY
    ► bit.ly/3OVpDyI
    ► bit.ly/3NEvUy0
    ► bit.ly/3IryxlT
    ► bit.ly/3RkWBLh
    JavaScript Based Automation Tools
    ********************************
    ► bit.ly/3nUx51X
    ► bit.ly/3AqI6Q0
    ► bit.ly/3yeurbT
    ► bit.ly/3ujzpTK
    Selector Hub Tools
    ********************
    ►rb.gy/h3h424
    GraphQL
    ******************
    ► rb.gy/sj3gys
    Cypress API Testing
    ********************
    ► shorturl.at/fjKPX
    Cypress Web Testing
    **********************
    ► shorturl.at/agjlK
    Playwright with Javascipt
    **************************
    ► shorturl.at/adSTY
    #PythonFileReading
    #TextFileHandling
    #ReadFromFilePython
    #FileIOinPython
    #PythonTextParsing
    #DataFromTextFile
    #PythonReadText
    #FileInputOutput
    #TextFileManipulation
    #PythonDataExtraction
    #FileReadingTutorial
    #TextFileReadOps
    #PythonFileOperations
    #ReadLinesPython
    #TextDataProcessing
    #FileHandlingTips
    #PythonFileReadTricks
    #TextFileReadMethods
    #PythonReadCSV
    #TextParsingTechniques
    #FileReadExamples
    #PythonReadTextGuide
    #TextFileReadFunctions
    #CSVReadingInPython
    #FileReadBestPractices
    #PythonTextFileExploration
    #ReadingTextData
    #FileInputMethods
    #PythonFileReadHowTo
    #TextDataExtraction
    #FileReadingSolutions
    #PythonFileReadTricks
    #TextFileReadDemo
    #DataExtractionTips
    #PythonFileReadExplained
    #TextFileIOinPython
    #FileReadCommonIssues
    #PythonTextFileSnippets
    #ReadTextData
    #FileHandlingInPython
    #PythonReadTextAdvice
    #TextFileReadWalkthrough
    #EfficientFileReading
    #PythonDataFromFile
    #TextFileReadTutorials
    #FileIOTricks
    #PythonTextFileExamples
    #ReadFromTXTFile
    #TextFileReadHacks
    #PythonFileReadGuidance

ความคิดเห็น • 9

  • @rajendramahapatra3293
    @rajendramahapatra3293 5 ปีที่แล้ว +4

    There is one more approach
    File file = new File(FilePath);
    FileInputStream stream = new FileInputStream(file);
    InputStreamReader reader = new InputStreamReader(stream);
    BufferedReader br = new BufferedReader(reader);
    String str;
    while((str=br.readLine())!=null){
    System.out.println(str);
    }
    br.close();

    • @sdetpavan
      @sdetpavan  5 ปีที่แล้ว +2

      Very good.

  • @aishwaryahr3252
    @aishwaryahr3252 4 ปีที่แล้ว +2

    Sir . .how can we print the output on the label...or like displaying some text on GUI.

  • @travelvlogs9050
    @travelvlogs9050 4 ปีที่แล้ว +1

    I have one question , assume the text file contains multiple paragraphs in it . I want to get only the 5 th paragraph text of that file ,not the complete text inside the file . Can u please suggest on this

  • @rafy-ivanmorales3077
    @rafy-ivanmorales3077 2 ปีที่แล้ว

    I’m a new student and need help to do this project:
    I have a port scanner script it works properly, it works in Pycharm using python3.9.
    I have to make a file and I did make call (Example.txt)
    On this file, I have to do this:
    3. If the Ports is open, it should create a file and add an entry for port number
    4. In case of any exception for instance “host is not available”, “host name could not be resolved” or
    due to any other error, you need to write that exception into the same file.
    I’m not asking for you to do the project for me, I'm only asking ware I need to work or used in my script to accomplish this because it is my first time doing this and working with python too, and I have been struggling with this part one very bad. I can even send you the code, so you can look and only tell me what I’m doing bad, is not working.

  • @salehashamim7803
    @salehashamim7803 3 ปีที่แล้ว

    Can we print notepad data to excel sheet through selenium?

  • @swapnilshinde8577
    @swapnilshinde8577 2 ปีที่แล้ว

    sir i think we have to write fr.close(); on the place of br.close(); because fr is handling file. please revert.

  • @jaiganeshacharya1198
    @jaiganeshacharya1198 4 ปีที่แล้ว

    Sir, how we can count the words/character from text file ?