Top Tweets for #Varargs
Second method uses varargs(Variable arguments):
> It Expects variable number of string arguments or a string array.

Day 2/100
Today I covered:
• Method syntax + structure
• Returning values + working with parameters
• Method overloading
• Scope (block, loop, method)
• Pass-by-value concept
• Shadowing & varargs
• Solved questions-prime no & Armstrong no
#BuildInPublic #100DaysOfCode
Day 1/100
Today I have covered :
• How Java works behind the scenes
• Input/Output, debugging, datatypes
• If-else conditions and logical flow
• Loops (for, while, do-while)
• Implemented a basic calculator
• Switch statements and nested cases
#buildinpublic #100DaysOfCode
@agnyaatavaasi For f((String) null); , the compiler sees a single String argument.
Varargs packs it into an array: new String[]{null}.
So s.length == 1.
Hence It prints 1.
Java Brain teaser 9 -
Varargs
'''java
void f(String... s) {
System.out.println(s.length);
}
f((String) null);
'''
What does this print? 🤔
👉 Hint: Varargs packs arguments into an array under the hood.
Trying something new with my knowledge in java
~ Combining
>> Varargs
>> Exception handling
>> Arrays
Yeah, I'm cooking something 😋
#Java #Concept #Varargs #Exceptionhandling #Array #CodingJourney #Enjoy

How could you take input from the user in java without using
• Scanner
• BufferedReader
• https://t.co/sQWBT9Vd5G()
• StringBuilder
#java #Coding #Concept #Varargs #OOPs #CodingChallenge #QuestionThinkAct #programming #codinglife

How could you take input from the user in java without using
• Scanner
• BufferedReader
• https://t.co/sQWBT9Vd5G()
• StringBuilder
#java #Coding #Concept #CodingChallenge #OOPs #QuestionOfTheDay #programming #codinglife

TODAY
Learnt about Variable Arguments (Varargs) in java
Revised Objects, Methods in OOPs
#Java #programming #OOPs #Concepts #CodingJourney

@Osa_Soft @theskilledcoder Yes. The limit is 10. It is done as a set of overloaded methods because varargs can't handle type pairs.
> Day [4] of Java Learning ✅️
□ Learned new topic Variable Argument(Varargs).
□ Sum of Integers using Varargs.
□ Maximum number using Varargs.
□ Strong Number program for logic building.
#100DaysOfCode #BuildInPublic #LogicBuilding
#Java #JavaProgramming
![KeshavP89324084's tweet photo. > Day [4] of Java Learning ✅️
□ Learned new topic Variable Argument(Varargs).
□ Sum of Integers using Varargs.
□ Maximum number using Varargs.
□ Strong Number program for logic building.
#100DaysOfCode #BuildInPublic #LogicBuilding
#Java #JavaProgramming https://t.co/U9g5ESSCuN](https://pbs.twimg.com/media/Guds4skagAAqDJP.jpg)
@khmarbaise @iamsaquibdev i mean the Varargs that created calling the method Arrays.asList `public static <T> List<T> asList(T... a)` the .list() method have severals signatures to avoid this
In Java, varargs with a non-reifiable type can lead to heap pollution, so the compiler issues warnings.
If you're sure you're using the array safely, e.g., you just iterate over the elements, annotate the method with:
@SafeVarargs
And suppress the warning.

@Manishrysk int varargs
Integer
Java Puzzle 🚀
Autoboxing vs. Varargs: The Silent Battle in Method Overloading!
❓️What will be the output of this code
#Java

Don’t stress over Java in 2025 ☕
Java is only this much 👇
1. Intro to Java
• Definition (OOP, Platform-Independent)
• JVM, JRE, JDK
• Compile vs Interpreted (Bytecode)
• Key Features (Portability, GC, Multi-threading)
• HelloWorld Structure
2. Basic Syntax
• Classes, `main` method
• Variables (Primitives vs Objects)
• Comments, Naming Conventions
• Packages, `import` Statements
3. Data Types
• Primitives (`int`, `double`, `boolean`)
• Wrapper Classes (`Integer`, `Boolean`)
• `String` Immutability, `var` (Type Inference)
• Arrays, `enum`
4. OOP Concepts
• Encapsulation (Getters/Setters)
• Inheritance (`extends`, `super`)
• Polymorphism (Overloading/Overriding)
• Abstraction (Abstract Classes, Interfaces)
5. Control Flow
• `if-else`, `switch` (Arrow Syntax)
• Loops (`for`, `while`, `do-while`)
• `break`, `continue`, Labels
• Ternary Operator
6. Methods
• Signature (Return Type, Parameters)
• Pass-by-Value vs Pass-by-Reference
• Varargs, Method Overloading
• Recursion, `static` Methods
7. Arrays & Collections
• Array Initialization
• `ArrayList`, `LinkedList`, `HashMap`
• Iterators, Enhanced `for` Loop
• Sorting (`Comparator`, `Comparable`)
8. Exception Handling
• `try-catch-finally`
• Checked vs Unchecked Exceptions
• Custom Exceptions
• `try-with-resources`
9. File I/O
• `File`, `FileReader`, `BufferedReader`
• NIO (`Path`, `Files`)
• Serialization/Deserialization
• JSON/XML Parsing (Libraries)
10. Multithreading
• `Thread` Class vs `Runnable`
• `synchronized`, `volatile`
• Thread Pool (`ExecutorService`)
• `CompletableFuture` (Async)
11. JDBC & Databases
• Drivers, Connection Pooling
• `Statement`, `PreparedStatement`
• Transactions, CRUD Operations
• ORMs (Hibernate, JPA)
12. Annotations & Reflection
• Built-in Annotations (`@ Override`)
• Custom Annotations
• Reflection API (Class Inspection)
13. Generics
• Type Parameters (`List<String>`)
• Bounded Types (`<T extends Number>`)
• Wildcards (`?`, `? super T`)
14. Lambda & Streams
• Functional Interfaces (`Predicate`, `Consumer`)
• Method References (`System.out::println`)
• Stream API (`filter`, `map`, `reduce`)
• Parallel Streams
15. Memory Management
• Heap vs Stack
• Garbage Collection (Young/Old Gen)
• `finalize()`, Weak References
• Memory Leaks
16. Design Patterns
• Singleton, Factory, Builder
• Observer, Strategy, Decorator
• Adapter, Proxy
17. JVM Internals
• Class Loaders, Bytecode
• JIT Compiler, JVM Flags
• Profiling Tools (VisualVM)
18. Build Tools
• Maven (`pom.xml`)
• Gradle (Groovy/Kotlin DSL)
• Dependency Management
19. Frameworks
• Spring (Boot, MVC, Security)
• Hibernate (JPA)
• Jakarta EE, Micronaut
20. Concurrency Utilities
• `Lock`, `Semaphore`, `CountDownLatch`
• Concurrent Collections (`ConcurrentHashMap`)
• `ForkJoinPool`
21. Networking
• Sockets (`ServerSocket`, `Socket`)
• HTTP Clients (HttpURLConnection, HttpClient)
• REST APIs (Spring REST)
22. Security
• `SecurityManager`, Permissions
• Cryptography (`MessageDigest`, `Cipher`)
• SSL/TLS, JWT
23. Advanced Topics
• Reflection, Proxies
• JNI (Native Methods)
• Modules (Java 9+), JPMS
24. Testing
• JUnit, TestNG
• Mocking (Mockito)
• TDD/BDD Basics
25. Future of Java
• Project Loom (Virtual Threads)
• Project Valhalla (Value Types)
• Pattern Matching, Records
• GraalVM (Native Compilation)
-------------- END --------------
❤️ Like and comment your feedback
♻ Repost to help others find it
Your support immensely motivates me to keep sharing more awesome tech content with you. 😊
In trying to understand the java.lang.SafeVarargs annotation, I wrote a blog post. When are varargs unsafe and unsafe in regards to what?
It discusses arrays, generics, heap pollution, reifiable type, non-reifiable types and more.
Read here: https://t.co/sDwVo69jq7
@OluwatolaAyomi4 @7etsuo "void clear_screen(void)" takes no arguments.
"void clear_screen()" in C99 takes any number and type of arguments (it's varargs).
Java varargs.
Java varargs (variable arguments) let you create methods that can handle an adjustable number of arguments. This makes your code more adaptable and avoids the need for overloaded methods or cumbersome arrays.
#Java #Programming #Varargs #Capecom
Java varargs and non-accessible types
I wrote a blog post about the interaction between varargs parameters and non-accessible types.
With the benefit of hindsight, it is perhaps an obvious point.
But I did not anticipate it.
https://t.co/gfR5xCaL0f
The java.lang.SafeVarargs annotation
When are varargs unsafe? Unsafe in regards to what?
I wrote a blog post to try to understand this annotation.
It discusses arrays, generics, heap pollution, reifiable type, non-reifiable types and more.
https://t.co/Q91Pk9dhWs
📢🗒️ Objectos Weekly #009: Java varargs and non-accessible types
An interaction between varargs parameters and non-accessible types led to a compilation error I did not anticipate... 😬
👇
https://t.co/GKeZhMpiQF
After a few years working with Kotlin, going back to C++ just to see how modern stuff e.g. lambdas and varargs work feels quite painful 😅
Trends for you
Most Popular Users

Elon Musk 
@elonmusk
239.8M followers

Barack Obama 
@barackobama
118.6M followers

Cristiano Ronaldo 
@cristiano
114.3M followers

Donald J. Trump 
@realdonaldtrump
111.7M followers

Narendra Modi 
@narendramodi
106.9M followers

Rihanna 
@rihanna
98.6M followers

NASA 
@nasa
92.1M followers

Justin Bieber 
@justinbieber
91.7M followers

KATY PERRY 
@katyperry
89.9M followers

Taylor Swift 
@taylorswift13
83.9M followers

Lady Gaga 
@ladygaga
75.4M followers

Virat Kohli 
@imvkohli
73.3M followers

Kim Kardashian 
@kimkardashian
70.8M followers

YouTube 
@youtube
68.6M followers

Neymar Jr 
@neymarjr
66.3M followers

Bill Gates 
@billgates
65.1M followers

Selena Gomez 
@selenagomez
63M followers

The Ellen Show
@theellenshow
62.1M followers

CNN 
@cnn
61.7M followers

X 
@x
60.6M followers















