//14 Syntax:File Delete and folder
import java.io.File;
public class DeleteFile {
public static void main(String[] args) {
try{
File DObj = new File("Location Of File");
if (DObj.delete()) {
System.out.println("Deleted the file: " + DObj.getName());
} else {
System.out.println("Failed to delete the file.");
}
}catch(Exception e){
System.out.println("Failed to delete the folder.");
}
finally{
File DFObj = new File("Location of Folder");
if (DFObj.delete()) {
System.out.println("Deleted the folder: " + DFObj.getName());
} else {
System.out.println("Failed to delete the folder.");
}
}
}
}
//Note This code can only run in Your PC
👍4
Output:
Deleted the file: test.txt
Failed to delete the folder.
Output of 14 Syntax:File Delete and folder
Deleted the file: test.txt
Failed to delete the folder.
Output of 14 Syntax:File Delete and folder
Remaining Topics like Inheritance, Polymorphism, Hash Map, Wrapper Classes, Regex, Threads, Lamda will be added soon
Create compiler bot in mobile
Run any language codes
In hindi:
Ab laptop ko kar do Tata bye bye gya 😂
https://youtu.be/352o8B9IikI?si=OSrhBU0mcFEkqILA
Run any language codes
In hindi:
Ab laptop ko kar do Tata bye bye gya 😂
https://youtu.be/352o8B9IikI?si=OSrhBU0mcFEkqILA
YouTube
How to create compiler bot and run c/c++ java python node js ts from mobile as server in termux
How to create compiler bot and run c/c++ java python node js ts from mobile as server in termux
Create own compiler bot in 2 minutes
Overview:
In this video, I exaplained You about how to use clone Compiler bot to create your own compiler bot.
keys:…
Create own compiler bot in 2 minutes
Overview:
In this video, I exaplained You about how to use clone Compiler bot to create your own compiler bot.
keys:…
👍3
Java all Codes listed see pin message 👆
Or you can search any keyword
Example: "function" to see function related codes
Or you can search any keyword
Example: "function" to see function related codes
#Taskforyou
Write a Java program that remove the extra spaces from the following string:
' I am learning Java object oriented programming '
Write a Java program that remove the extra spaces from the following string:
' I am learning Java object oriented programming '
👍1
Write code on task's comment, which code will be best that code should be posted here with those name
After 8pm today
After 8pm today
👍1
#TaskAnswer
public class TaskAnswer {
public static void main(String[] args) {
String str = "I am learning Java object oriented programming";
str = str.replaceAll("\\s", "");
System.out.println(str);
}
}
Output:
Iamlearningobjectorientedprogramming
public class TaskAnswer {
public static void main(String[] args) {
String str = "I am learning Java object oriented programming";
str = str.replaceAll("\\s", "");
System.out.println(str);
}
}
Output:
Iamlearningobjectorientedprogramming
👍2
Explanation:
str = str.replaceAll("\\s", "") : This line replaces all whitespace characters in the string
str = str.replaceAll("\\s", "") : This line replaces all whitespace characters in the string
str with an empty string, effectively removing them. The \\s is a regular expression pattern that matches any whitespace character, such as spaces, tabs, or newlines. The double backslash \\ is necessary because \ is an escape character in Java strings, so to represent a single backslash in a regular expression, you need to escape it with another backslash.
Java Codes Basic to Advance
Write your Code in Comment below 👇👇
Solution:
import java.util.Scanner;
public class Pattern {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter the value of n: ");
int n = scan.nextInt();
for (int i = 1 ; i <= n; i++) {
for (int j = 1; j <= n - i; j++) {
System.out.print("1 ");
}
for(int k = 1; k <= i; k++){
System.out.print(i + " ");
}
System.out.println();
}
}
}👍7
If you want learn js for website development 👇join it
@react_next_js
For any problems in js site development feel free to ask questions 😊👇
@reactjs_nextjs_group
@react_next_js
For any problems in js site development feel free to ask questions 😊👇
@reactjs_nextjs_group
👍2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Free Study Resources everything join more ✅ https://t.me/addlist/c3QWwWR-Iw4xMDNl
Subscribe Our New channel for coding, designing, hacking and computer related everything 😁
👉✅ https://youtube.com/@CODEBOMBB
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Free Study Resources everything join more ✅ https://t.me/addlist/c3QWwWR-Iw4xMDNl
Subscribe Our New channel for coding, designing, hacking and computer related everything 😁
👉✅ https://youtube.com/@CODEBOMBB
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👍2
This media is not supported in your browser
VIEW IN TELEGRAM
👩💻 Welcome to @CodesSnippet! 🔫
Join us for daily snippets of coding👩💻 knowledge! 💻
Here, you'll find 👀 bite-sized pieces of code, programming tips, and tricks to level up your coding skills! 💻
Stay updated on the latest trends in the tech world and engage with fellow coders 💗 in our vibrant community! 🌐💬
Let's crack the coding 👩💻 together and bring your projects to life!
⭐️👨💻
Lang : Python , Java, Javascript, c++ and many more.
#CodeSnippet
#ProgrammingFun
Jᴏɪɴ ᴜs :- @CodesSnippet
Join us for daily snippets of coding👩💻 knowledge! 💻
Here, you'll find 👀 bite-sized pieces of code, programming tips, and tricks to level up your coding skills! 💻
Stay updated on the latest trends in the tech world and engage with fellow coders 💗 in our vibrant community! 🌐💬
Let's crack the coding 👩💻 together and bring your projects to life!
⭐️👨💻
Lang : Python , Java, Javascript, c++ and many more.
#CodeSnippet
#ProgrammingFun
Jᴏɪɴ ᴜs :- @CodesSnippet
👍2❤1
Chatting ke liye group
@isc_chat
Ab study group ke bajay is group me off topics discuss karna
Aur jo active hoga vaha use admin bana dunga
@isc_chat
Ab study group ke bajay is group me off topics discuss karna
Aur jo active hoga vaha use admin bana dunga
Node js full video
https://youtu.be/WW4NZySuL5Y?si=dDLJBTnufUn7Ub1m
After watching it next:
Create telegram bot
Create websites
Create apis
Create apps
And so on...
Topics Covered:
Watch it first at morning 8:30 (Live)
Node js full video
https://youtu.be/WW4NZySuL5Y?si=dDLJBTnufUn7Ub1m
https://youtu.be/WW4NZySuL5Y?si=dDLJBTnufUn7Ub1m
After watching it next:
Create telegram bot
Create websites
Create apis
Create apps
And so on...
Topics Covered:
00:00:00 - Intro of video
00:02:26 - Introduction to node js
00:05:59 - Setup node js environment
00:07:33 - Installing Visual studio Code IDE
00:08:39 - Installing Node js
00:12:58 - Understand about node folder setup
00:15:18 - Basic function of js console.log
00:19:25 - Basic Datatypes of js (Start of basic javascript)
00:25:15 - Variables and Constant in js
00:33:45 - Js Object and List (Array)
00:53:08 - Javascript Operators
01:02:24 - if else Control statement in js
01:08:00 - while and for loops in js
01:17:01 - functions in javascript
01:21:23 - Understand asynchronous javascript
01:26:52 - Understand why async/await in js
01:31:01 - Understand js callback functions
01:36:38 - Use of built in modules in js (example: fs module)
01:40:32 - installing external libraries and fetching data (example axios)
01:48:14 - Anonymous functions in js
01:51:38 - Some of my words for why you learnt this js
Watch it first at morning 8:30 (Live)
Node js full video
https://youtu.be/WW4NZySuL5Y?si=dDLJBTnufUn7Ub1m
👍2
Node js full video watch now live
https://youtu.be/WW4NZySuL5Y?si=dDLJBTnufUn7Ub1m
After watching it next:
Create telegram bot
Create websites
Create apis
Create apps
And so on...
https://youtu.be/WW4NZySuL5Y?si=dDLJBTnufUn7Ub1m
After watching it next:
Create telegram bot
Create websites
Create apis
Create apps
And so on...
👍2
Forwarded from IGNOU Info Guidance update news (Si͟d शर्मा)
❤1👍1
This media is not supported in your browser
VIEW IN TELEGRAM
Jo log mahangai aur berojgari bolte rahte hain unhe ye dekhna chahiye
Timestamp
00:00 - Mahangai
02:00 - Berojgari
https://youtu.be/zY1uOEDxOOU?si=e_0eTubOVxUdQdsM
Timestamp
00:00 - Mahangai
02:00 - Berojgari
https://youtu.be/zY1uOEDxOOU?si=e_0eTubOVxUdQdsM
🔥1